thinhpd/translate

package_description


Keywords
laravel, translate
License
MIT-feh

Documentation

Translate

Latest Version on Packagist Total Downloads Build Status StyleCI

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.