Laravel Translation Scanner


December 4th, 2019

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:

php 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:

# Upload
php artisan translation:upload

# Scan the codebase and then upload
php artisan translation:upload --scan

# Download translation languages
php artisan translation:download

Finally, you can even create public JavaScript translations files that are available on window.i18n with:

php 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.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.