Download the PHP package exolnet/laravel-translation without Composer
On this page you can find all versions of the php package exolnet/laravel-translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download exolnet/laravel-translation
More information about exolnet/laravel-translation
Files in exolnet/laravel-translation
Package laravel-translation
Short Description Library to manage Laravel translations
License MIT
Homepage https://github.com/eXolnet/laravel-translations
Informations about the package laravel-translation
Laravel Translation
Library to manage Laravel translations
Installation
Require this package with composer:
To make sure the routing system is using the one supporting the translation you must edit your bootstrap/app.php
to change the Application class import
Now you're ready to start using the translation in your application.
Config
Config Files
In order to edit the default configuration (where for e.g. you can find available_locales
) for this package you may execute:
After that, config/translation.php
will be created. Inside this file you will find all the fields that can be edited in this package.
Usage
Exolnet Translation uses the URL given for the request. In order to achieve this purpose, a route group should be added into the routes/web.php
file. It will filter all pages that must be localized.
Once this route group is added to the routes file, a user can access all locales added into available_locales
. For example, a user can now access two different locales, using the following addresses:
If you when to remove the locale prefix on the base locale you need to set the $avoidPrefixOnBaseLocale
to true
when defining the groupLocale
Testing
To run the phpUnit tests, please use:
Contributing
Please see CODE OF CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Alexandre D'Eschambeault
- Simon Gaudreau
- Patricia Gagnon-Renaud
- All Contributors
License
This code is licensed under the MIT license. Please see the license file for more information.
All versions of laravel-translation with dependencies
astrotomic/laravel-translatable Version ^11.0
illuminate/contracts Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
illuminate/routing Version ^10.0|^11.0
illuminate/translation Version ^10.0|^11.0