Skip to content

This is a demonstration of a Laravel application showcasing the seamless process of changing language locales.

License

Notifications You must be signed in to change notification settings

askdkc/laravel-language-switcher

Repository files navigation

Language Switcher Sample (言語切り替えサンプル)

This is language switcher Laravel app sample. Laravelの言語切り替えサンプルです🇺🇸🇯🇵

langswitch

Installation

git clone this_repository
cd this_repository
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate

npm install && npm run build

php artisan serve

Open http://localhost:8000 in your browser. (ブラウザでURL開いてね)

Implementation

  • Japanese Language files: lang/ja.json, lang/ja/[auth|pagination|passwords|validation].php (言語ファイル)
  • Language Switch Middleware: app/Http/Middleware/Localization.php (言語切替ミドルウェア)
  • Kernel (Register Language Switch Middleware): app/Http/Kernel.php (カーネル:言語切替ミドルウェア登録)
  • Route (Language Switcher Route): routes/web.php (ルーティング 言語切替ルート)

Screen Shot

  • English (英語)

English Screen

  • Japanese (日本語)

Japanese Screen

About

This is a demonstration of a Laravel application showcasing the seamless process of changing language locales.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages