https://github.com/arnissolle/laravel-localization
Laravel localization package
https://github.com/arnissolle/laravel-localization
composer l10n language laravel localization middleware
Last synced: 5 months ago
JSON representation
Laravel localization package
- Host: GitHub
- URL: https://github.com/arnissolle/laravel-localization
- Owner: arnissolle
- License: mit
- Created: 2019-04-06T17:10:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-25T20:42:43.000Z (over 6 years ago)
- Last Synced: 2026-01-11T13:17:22.632Z (5 months ago)
- Topics: composer, l10n, language, laravel, localization, middleware
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
## Introduction
The Laravel Localization package is built for Laravel 5.8+ and provides:
- [x] Localized routes with language URL prefixes.
- [ ] Domain based localized routes.
- [x] Middleware to detect user language based on HTTP header and session.
- [x] Redirect the user to the localized version.
- [ ] Possibility to hide the language URL prefix for the default language.
- [ ] Possibility to localize a subset of routes only.
- [ ] Language Switcher and Hreflang Meta Tags
- [ ] Patched `route()` method to use localized routes whenever possible.
- [ ] Compatibility with `artisan route:cache`.
## Installation
To get started, use Composer to add the package to your project's dependencies:
```
composer require arnissolle/laravel-localization
```
Add the middleware to the `web` group in `App/Http/Kernel.php`:
```php
protected $middlewareGroups = [
'web' => [
// ...
\Arnissolle\Localization\Middleware\Handler::class,
],
];
```