The vemcogroup/laravel-translation package by Henrik B Hansen scans your applications for translations and creates your translation JSON files.
The app also has a configuration property for a poeditor API key and project ID, which allows you to upload/download poeditor features.
To use this package, once installed, you run the provided artisan command to scan the project:
1php artisan translation:scan
The command creates a base_language.json
file in the resources/lang
directory.
To work with poeditor, you can run the following commands in your app:
1# Upload2php artisan translation:upload3 4# Scan the codebase and then upload5php artisan translation:upload --scan6 7# Download translation languages8php artisan translation:download
Finally, you can even create public JavaScript translations files that are available on window.i18n
with:
1php artisan translation:create-js
You can learn more about this package, get full installation instructions, and view the source code on GitHub at vemcogroup/laravel-translation.
0 comments:
Post a Comment
Thanks