NOTE
Package for laravel 5.1 & 5.2
_____ 5.1 _____ This packages using "illuminate/html", so please install it before using this package
- How to use "illuminate/html" at: https://packagist.org/packages/illuminate/html _____ 5.2 _____ This packages using "laravelcollective/html" instead, so please install it before using this package
- How to use "laravelcollective/html" at: https://packagist.org/packages/laravelcollective/html
========== After that ==========
- You need to add this service provider to: config/app.php
"Gralias\Translates\TranslateServiceProvider::class"
- And publish migrations and router with:
"php artisan vendor:publish"
- Remeber to migrate database (>.<) by typing: php artisan migrate
- Test packages at
yourdomain/translates
How to use: to generate locale language you must follow this:
- In view file:
{!! trans(foo.bar_text_1) !!}
- 'foo': name of file will save to : resource/lang/en/foo.php.
- 'bar_text_1': string will be store in file like that
return ['bar_text_1' => 'bar text 1'];
- after set some strings in views you must update, translate and export it. Done!