Download the PHP package awema-pl/module-localization-helper without Composer
On this page you can find all versions of the php package awema-pl/module-localization-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download awema-pl/module-localization-helper
More information about awema-pl/module-localization-helper
Files in awema-pl/module-localization-helper
Package module-localization-helper
Short Description Package for convenient work with Laravel's localization features
License MIT
Homepage https://github.com/awema-pl/module-localization-helper
Informations about the package module-localization-helper
LocalizationHelper
Package for convenient work with Laravel's localization features and fast language files generation. Take a look at contributing.md to see a to do list.
Installation
Via Composer
In Laravel 5.5+, service provider and facade will be automatically registered. For older versions, follow the steps below:
Register service provider in config/app.php
:
You may also register LaravelLocalization
facade:
Config
Config Files
In order to edit default configuration you may execute:
After that, config/localizationhelper.php
will be created.
Usage
Package registers global helper function _p($file_key, $default, $placeholders)
:
It will create new localization file auth.php
(if it doesn't exist) and write second parameter as language string under login
key:
On second call with same file/key _p('auth.login')
, localization string will be returned, file will remain untouched.
Placeholders are also supported:
If key is returned, it means that string already exists in localization file and you are trying to add new one using its value as an array.
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Galymzhan Begimov
- All Contributors