Download the PHP package alexstack/laravel-cms-plugin-translator without Composer
On this page you can find all versions of the php package alexstack/laravel-cms-plugin-translator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexstack/laravel-cms-plugin-translator
More information about alexstack/laravel-cms-plugin-translator
Files in alexstack/laravel-cms-plugin-translator
Package laravel-cms-plugin-translator
Short Description Automatically translate content via Baidu FanYi API or Google Translate API when you add or edit a page
License MIT
Homepage https://github.com/AlexStack/Laravel-CMS-Plugin-Translator
Informations about the package laravel-cms-plugin-translator
Translate content online by Baidu AI or Google AI
- This is an Amila Laravel CMS Plugin
- Automatically translate content online via Baidu FanYi API or Google Translate API or Google Translate Free Version
Install it via the backend
- Go to the CMS settings page -> Plugin -> search for remote image
- Find alexstack/laravel-cms-plugin-translator
- Click the Install button
What the plugin do for us?
- Translate content online
- Add the translate result to the page content
Install it via command line manually
How to use it?
-
It's enabled after install by default. You can see a Translator tab when you edit a page.
- Note: Google translate API not support before 1.0 version.
How to change the settings?
- You can change the settings by edit plugin.page-tab-translator
- Change the api_provider to baidu or google
- Set up app_id and app_key from the baidu or google translate api page. eg.
Where can I get the app_id & app_key
-
Option 1: Provider Baidu, From https://api.fanyi.baidu.com/, FREE, only 1 translate allowed per second
- Option 2: Provider Google, Advanced version. NOT SUPPORT YET. From https://cloud.google.com/translate/docs/, Need to pay for what you use, price is \$20 per million characters in 2020.
Use the free Google translate
- Set provider to Google_Free
-
Option 1: Set both app_id & app_key to google_free_001, then our CMS will use package https://github.com/dejurin/php-google-translate-for-free to do the translate. (It's the default setting after install)
-
Option 2: Set both app_id & app_key to google_free_002, then our CMS will use the package https://github.com/Stichoza/google-translate-php to do the translate, YOU NEED INSTALL THE PACKAGE VIA COMMAND LINE FIRST: composer require stichoza/google-translate-php
- Limitations of free Google translate: (1) Google only allows a maximum of 5000 characters to be translated at once. If you want to translate a longer text, you can split it to shorter parts, and translate them one-by-one. (2) 503,429,403 error it is most likely that Google has banned your external IP address and/or requires you to solve a CAPTCHA. This is not a bug in this package. Google has become stricter, and it seems like they keep lowering the number of allowed requests per IP per a certain amount of time. You may need to wait 12-36 hours. More details
Improve this plugin & documents
- You are very welcome to improve this plugin and how to use documents
License
- This Amila Laravel CMS plugin is an open-source software licensed under the MIT license.