Download the PHP package kaishiyoku/yaml-translation without Composer
On this page you can find all versions of the php package kaishiyoku/yaml-translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kaishiyoku/yaml-translation
More information about kaishiyoku/yaml-translation
Files in kaishiyoku/yaml-translation
Package yaml-translation
Short Description Add YAML file support to Laravel TranslationServiceProvider
License MIT
Informations about the package yaml-translation
Add Yaml file support for Laravel >=5.4 TranslationServiceProvider
This package uses Symfony/Yaml parser. Note: This is a fork from the orignal version of Devitek: https://github.com/Devitek/laravel-yaml-translation
Please note
Laravel =>5.4 only support for coming =>5.4.* releases. If you still want to use this package with an older Laravel version use an older release.
The last release with Laravel <= 5.3.* support is 5.0.1
Please note: As with version 5.5.1 this package is using Symfony Yaml Parser v3.* and therefore the YAML format has been changed a bit - you now have to escape lines with quotes (either double or single ones) when there are special keys present like a colon, otherwise you'll get an error like this: A colon cannot be used in an unquoted mapping value at line [...]
. I have slightly changed the example below to demonstrate the changes.
Installing
Add to your composer.json by running
Add support in Laravel
Replace with in app/config/app.php.
How to use
Just use regular php files or use yml or yaml files instead. In order to use Yaml your localization files must end with *.yml.php, *.yaml.php, *.yml or *.yaml
Example
PHP:
Will be equivalent to :
YAML:
Please note: The Symfony Yaml parser expects indentation, using indentations will cause an exception.
If you have any issues feel free to open a ticket :)
Author
Twitter: @kaishiyoku
Website: www.andreas-wiedel.de
All versions of yaml-translation with dependencies
illuminate/translation Version 5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*
symfony/yaml Version 3.*