Download the PHP package mahmoud217tr/auto-files-localizer without Composer
On this page you can find all versions of the php package mahmoud217tr/auto-files-localizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mahmoud217tr/auto-files-localizer
More information about mahmoud217tr/auto-files-localizer
Files in mahmoud217tr/auto-files-localizer
Package auto-files-localizer
Short Description Laravel Localization package that auto generate json locale files
License MIT
Homepage https://github.com/mahmoud217tr/auto-files-localizer
Informations about the package auto-files-localizer
Auto Files Localizer for Laravel
Easy and Efficient Localiztion
A Laravel Localization package that auto generate json locale files
Table of Contents
- Features
- Installation
- Config
- Usage
- Dynamic Mode
- Extraction Mode
- Testing
- Changelog
- Security Vulnerabilities
- Credits
- License
Features
- Supports Laravel (8.X, 9.X, 10.X, 11.X).
- 2 Modes (Dynamic Mode, Extraction Mode).
- Fast and reliable.
Installation
You can install the package via composer:
Config
To publish the package configuration file config/auto-localizer.php use the following command:
Usage
It will automatically generate the locale .json file where the localized new words are sorted alphabetically.
There are 2 modes for the package
Dynamic Mode
In this mode the translations will be generated dynamically (On Request) which means on upon calling the translation function the package will dynamically detect the current language and add the translations to the corresponding JSON file.
Notes
-
Note that this mode shouldn't work on production for performance purposes, but if you want to change this behavior via the configuration file.
- This mode is not recommended using with
vite developmentmode. If you want to use it please build your assets first usingnpm run buildthen activate the auto translation mode. OTHERWISE YOUR APP WILL STUCK IN RELOAD LOOP
Activiation
To activate the dynamic mode on non-production environment just add the following line to the .env file:
And that's about it the autotranslator will add transaltions to there files sorted alphabetically.
To deactivate the dynamic mode just set the previous value to false.
Configurations
This mode have the following configurations:
Extraction Mode
In this mode the translations will be extracted automatically from views or php files detecting translation functions adding the translations to the corresponding JSON file.
Command
To extract the translations for a specific locale (ar for example) run the following command:
The previous command will translate all non-localized phrases and all ar-localized phrases only.
Configurations
This mode have the following configurations:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Mahmoud Mahmoud
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of auto-files-localizer with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0
illuminate/config Version ^9.0|^10.0|^11.0
illuminate/console Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/filesystem Version ^9.0|^10.0|^11.0
illuminate/translation Version ^9.0|^10.0|^11.0
symfony/finder Version ^5.1|^6.0|^7.0