How to automatically translate? #162
-
eg: add
How to automatically make file |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
If this line is in your package, which you created using our template or something similar, then you can perform the translation by calling the console command: # will run translation only for zh_CN locale
vendor/bin/lang translate zh_CN
# will run tranlations for all installed locales into your package
vendor/bin/lang translate
And if this file is located in your Laravel project, then our current software solutions cannot help you with the translation. In this case, we recommend using online translators, for example, Google Translate. Or to translate your phrases, you can use third-party packages, for example, stichoza/google-translate-php. |
Beta Was this translation helpful? Give feedback.
Laravel Lang projects do not have this, but you can use another package from a third-party developer: tanmuhittin/laravel-google-translate
composer require tanmuhittin/laravel-google-translate php artisan vendor:publish --provider="Tanmuhittin\LaravelGoogleTranslate\LaravelGoogleTranslateServiceProvider"
Next, configure it, after which you can translate files: