https://github.com/askdkc/laravel-language-switcher
This is a demonstration of a Laravel application showcasing the seamless process of changing language locales.
https://github.com/askdkc/laravel-language-switcher
Last synced: 5 months ago
JSON representation
This is a demonstration of a Laravel application showcasing the seamless process of changing language locales.
- Host: GitHub
- URL: https://github.com/askdkc/laravel-language-switcher
- Owner: askdkc
- License: mit
- Created: 2023-07-06T15:31:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-27T23:02:22.000Z (5 months ago)
- Last Synced: 2026-01-28T12:26:25.628Z (5 months ago)
- Language: PHP
- Size: 1000 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Language Switcher Sample (言語切り替えサンプル)
This is language switcher Laravel app sample. Laravelの言語切り替えサンプルです🇺🇸🇯🇵

## Installation
```bash
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`](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 (英語)

- Japanese (日本語)