2017 © Pedro Peláez
 

library laravel-lang-selector

Create smart multi-language website by laravel

image

pinfort/laravel-lang-selector

Create smart multi-language website by laravel

  • Tuesday, May 8, 2018
  • by pinfort
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

laravel-lang-selector

Create smart multi-language website by laravel, (*1)

Basic Usage

Installation

composer require pinfort/laravel-lang-selector

Attention: Perhaps it is necessary to change the minimum stability of the composer..., (*2)

Publish files

php artisan vendor:publish

You will find three new files. - public/vendor/LangSelector/language.css - It is required. - config/language.php - You will edit this file. - resources/views/vendor/LaravelTopNav/lang_menu.blade.php - This file is main view of menu. - In basic, you have no need to edit this file., (*3)

Edit config

Edit config/language.php whatever you need. Read comments in the file., (*4)

Enable library

Add style sheet link to your view. near the line 14, (*5)

in resources/views/layouts/app.blade.php(created by make:auth command), (*6)

 <!-- Styles -->
 <link href="{{ asset('css/app.css') }}" rel="stylesheet">
+<link href="{{ asset('vendor/LangSelector/language.css') }}" rel="stylesheet">

Add following code in your view., (*7)

in resources/views/layouts/app.blade.php(created by make:auth command), (*8)

near the line 66, (*9)

         </li>
     @endguest
+    @include('LaravelLangSelector::lang_menu')
 </ul>

Add middleware to your kernel, (*10)

in App\Http\Kernel.php near the line 38, (*11)

 protected $middlewareGroups = [
    'web' => [
        ......
+       \Pinfort\LaravelLangSelector\Middleware\LangSelector::class,
    ],
 ......
 ];

The Versions

08/05 2018

dev-master

9999999-dev

Create smart multi-language website by laravel

  Sources   Download

MIT

The Requires

 

by Avatar pinfort

laravel language i18n internationalization localization l10n multi-language

08/05 2018

v0.0.1

0.0.1.0

Create smart multi-language website by laravel

  Sources   Download

MIT

The Requires

 

by Avatar pinfort

laravel language i18n internationalization localization l10n multi-language