thinhpd / translate
:package_description
1.0.4
2020-02-07 10:21 UTC
Requires
- illuminate/support: ~5|~6
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3|~4
- phpunit/phpunit: ^8.0
- sempro/phpunit-pretty-print: ^1.0
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
trong infoym, trước khi cài đặt hãy chạy trước 2 câu lệnh để public localization
php artisan infyom:publish --localized php artisan infyom.publish:layout --localized
Via Composer
composer require thinhpd/translate
Run command
php artisan vendor:publish --provider="Thinhpd\Translate\TranslateServiceProvider"
Add code in Kernel in $middlewareGroups 'web'
\App\Http\Middleware\Localization::class,
Add route in routes/web.php
Route::get('lang/{lang}', 'LangController@changeLang')->name('lang');
Create change html : add code in html
<li style="width: 50px;"> <a href="{{ route('lang',['lang' => 'vi']) }}" >VI </a> </li> <li style="width: 50px;"> <a href="{{ route('lang',['lang' => 'en']) }}" >EN </a> </li>
Usage
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
license. Please see the license file for more information.