| Install | |
|---|---|
composer require devitek/yaml-translation |
|
| Latest Version: | 4.1.0 |
| PHP: | >=7.0 |
| License: | MIT |
| Last Updated: | Sep 28, 2017 |
| Links: | GitHub · Packagist |
This package uses Symfony/Yaml parser.
Add "devitek/yaml-translation": "4.*" to your composer.json by running :
composer require devitek/yaml-translation
And select version: 4.*
Finally, publish all vendor assets to create a yaml-translation.php:
php artisan vendor:publish
You have to replace
'Illuminate\Translation\TranslationServiceProvider',
with
'Devitek\Core\Translation\TranslationServiceProvider',
in app/config/app.php.
Just use regular php files or use yml or yaml files instead.
PHP :
<?php
return [
'hello' => 'Hello :name',
'author' => 'Devitek',
];
Will be equivalent to :
YAML
hello: Hello :name
author: Devitek
Enjoy it ! Feel free to fork :) !