Download the PHP package jonasschen/laravel-lang-monitor without Composer
On this page you can find all versions of the php package jonasschen/laravel-lang-monitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jonasschen/laravel-lang-monitor
More information about jonasschen/laravel-lang-monitor
Files in jonasschen/laravel-lang-monitor
Package laravel-lang-monitor
Short Description Search for untranslated keys in your Laravel project
License MIT
Homepage https://github.com/jonasschen/laravel-lang-monitor
Informations about the package laravel-lang-monitor
Laravel Lang Monitor
Automatically search for keys or phrases in your project that have no translations.
Using Laravel Lang Monitor you can get all missing translations.
Installation
You can install the package via composer:
Publish the config file using the artisan CLI tool:
Available configurations
- abort_if_directory_doesnt_exists (Default: false)
- Abort if directory doesn't exists: If any of the configured directories of the "directories_to_search" array does not exist, the scanning process will be aborted, otherwise only an alert it will be logged an in the console;
- abort_if_lang_file_doesnt_exists (Default: false)
- Abort if lang file doesn't exists: If any of the configured lang files of the "lang_files" array does not exist, the scanning process will be aborted, otherwise only an alert it will be logged an in the console;
- scan_for_unused_translations (Default: true)
- If enabled, will check if all key translations are in use and log unused keys
- directories_to_search (Default: ['app', 'resources/views'])
- Directories to search: A list of directories where the package will perform the scanning process;
- extensions_to_search (Default: ['php', 'js'])
- Extensions to search: A list of file extensions that the package will consider to perform the scanning process;
- lang_files (Default: ['resources/lang/en.json'])
- Lang files: A list of lang files where the package will try to search the translations keys;
- locale Default(en.utf8)
- Locale: The locale of main project language. It will be used to perform a improved sorting of the untranslated keys when exporting result;
Usage
Use the command below, it is that easy!
Output example with missing translations
Output example without missing translations
Export untranslated keys to JSON file format
You can export missing translations result for a file in a JSON format. use the --export_missed_json_file option like this:
Export untranslated keys to PHP file format
You can export missing translations result for a file in a PHP format. use the --export_missed_php_file option like this:
Export untranslated keys to text file format
You can export missing translations result for a file in a text format. use the --export_missed_text_file option like this:
Export unused keys to JSON file format
You can export unused keys result for a file in a JSON format. use the --export_unused_json_file option like this:
Export unused keys to PHP file format
You can export unused keys result for a file in a PHP format. use the --export_unused_php_file option like this:
Export unused keys to text file format
You can export unused keys result for a file in a text format. use the --export_unused_text_file option like this:
Translation function support
This package supports @lang(), __() and trans() functions.
Lang file format support
This package supports .php files and .json files formats.
Consider Sponsoring
Help me maintain this project, please consider looking at the FUNDING file for more info.
BTC
ETH
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker. Please do not email any questions, open an issue if you have a question.
Credits
- Jonas Schen
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-lang-monitor with dependencies
ext-json Version *