Download the PHP package novasa/laravel-language-center without Composer
On this page you can find all versions of the php package novasa/laravel-language-center. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-language-center
Laravel Language Center
Language Center for Laravel.
This requires access to Novasa's Language Center.
Install
Run composer require novasa/laravel-language-center:~2.0.
In config/app.php replace Illuminate\Translation\TranslationServiceProvider::class, with Novasa\LaravelLanguageCenter\TranslationServiceProvider::class, in the providers-section.
Then add the the following environments to your application:
For publishing the configuration file run:
Usage
You can use the Laravel standard trans-function.
will return the value of the string id
header.login.
However if the string id forheader.logindoes not exists it will returnheader.login.Will return the value of the string id
header.welcome_back, but will replace:usernamewithMarkin the translation. However if the string id forheader.welcome_backdoes not exists it will returnheader.welcome_back.Will return the value of the string id
header.hello_world. However if the string id forheader.hello_worlddoes not exists it will returnHello World!.Will return the value of the string id
header.hello_user, but will replace:usernamewithMarkin the translation. However if the string id forheader.hello_userdoes not exists it will returnHello Mark!.Will return the value of the string id
header.download, but for the platormios. However if the string id forheader.downloaddoes not exists it will returnYou should download our iOS app!.Will return the value of the string id
footer.copyright. However if the string id forfooter.copyrightdoes not exists it will returnCopyright 2016 Novasa. This will also add a comment to the Language Center.
Note
If a translation does not exists it will automatically be created at the Language Center.
Also please note that the locale and local_fallback in the Laravel configurations are overwritten by the settings from the Language Center.