
How to Build Multilingual Laravel Pages with Localized URLs and Translated Models
Build multilingual Laravel pages with locale-safe URLs, Eloquent content translations, localized slugs, predictable fallbacks, and language links.
Localization registers your routes once per language as real, cacheable Laravel routes, with translated paths and localized slugs, and negotiates the language of API responses from the user, session, cookie or Accept-Language header, without hidden redirects or shared state.
Each line is released for the versions in its row, read from that release's composer.json. Pick the line that matches your project; a combination not listed isn't supported. Find the right line of every package for your project.
| Line | Latest release | PHP | Laravel | Status | Docs |
|---|---|---|---|---|---|
| v13.x | v13.0.0 Nov 19, 2026 | 8.3 – 8.5 | 13 | Current | Docs: Read the v13.x docs |
| v12.x | v12.0.0 Nov 19, 2026 | 8.2 – 8.5 | 12 | Maintained | Docs: Read the v12.x docs |
| v11.x | v11.0.0 Nov 19, 2026 | 8.2 – 8.4 | 11 | MaintainedLaravel 11 no longer gets security fixes | Docs: Read the v11.x docs |
| v10.x | v10.0.0 Nov 19, 2026 | 8.1 – 8.3 | 10 | MaintainedLaravel 10 no longer gets security fixes | Docs: Read the v10.x docs |
| v9.x | v9.0.0 Nov 19, 2026 | 8.0 – 8.2 | 9 | MaintainedLaravel 9 no longer gets security fixes | Docs: Read the v9.x docs |
| v8.x | v8.0.0 Nov 19, 2026 | 8.0 – 8.1 | 8 | MaintainedLaravel 8 no longer gets security fixes | Docs: Read the v8.x docs |
| v7.x | v7.0.0 Nov 19, 2026 | 8.0 | 7 | MaintainedLaravel 7 no longer gets security fixes | Docs: Read the v7.x docs |
| v6.x | v6.0.0 Nov 19, 2026 | 8.0 | 6 | MaintainedLaravel 6 no longer gets security fixes | Docs: Read the v6.x docs |
From the package's releases and its GitHub Actions. A passing run means the test suite passed on develop, on every PHP version it supports; it isn't a security review, and each release line has its own runs on GitHub. Checked hourly.
Localized pages for the website, negotiated locales for the API.
1use App\Http\Controllers\ApiProductController; 2use App\Http\Controllers\ProductController; 3 4Route::localized(function (): void { 5 Route::get('/products', [ProductController::class, 'index'])->name('products.index'); 6}); 7// /products (en), /ar/المنتجات, /fr/produits 8 9Route::middleware('localization')10 ->get('/api/products', [ApiProductController::class, 'index']);11// Accept-Language: ar-EG,ar;q=0.9 → Content-Language: ar12 13locale()->route('products.index', locale: 'fr'); // "https://example.com/fr/produits"Wrap routes in one macro for websites, add one middleware for APIs.
Route::localized() registers one real route per locale, safe for route:cache.
Translate path segments with lang/{locale}/routes.php, Unicode included.
User, session, cookie, Accept-Language or your own class, in your order.
switchUrl(), alternates() and hreflangs() for the current page.
Sign localized routes with Laravel's own signer and signed middleware.
No hidden redirects, no automatic writes, and nothing carried between requests.
Practical guides that use Laravel Localization, or solve the problem it was built for.

Build multilingual Laravel pages with locale-safe URLs, Eloquent content translations, localized slugs, predictable fallbacks, and language links.
Quick answers about installing and using Localization.
Localized routing for Laravel. Static, cacheable locale-prefixed URLs for websites, and an ordered resolver pipeline (user, session, cookie, Accept-Language) for APIs. It's a free, open-source Laravel package by Pharaonic.
Run composer require pharaonic/laravel-localization in your project's root directory.
The latest release requires PHP 8.3 – 8.5 and Laravel 13.
Yes. Every locale gets its own static route, and the locale is stored in the route itself, so cached routes behave exactly like uncached ones. Use controller actions, since Laravel can't cache closures.
No. A language in the URL always wins, and the unprefixed URL is always the default language. Preferences only apply to routes that use the localization middleware.
Not as a built-in mode. Use Laravel's Route::domain() groups, and a custom resolver when the domain decides the language.
Yes. Localization is open source under the MIT license, so you can use it in personal and commercial projects.
Read the Localization documentation for setup, configuration, and usage examples.
Open an issue or a pull request on GitHub, ask in GitHub Discussions, or chat with us on Discord.
Read the full documentation for installation, configuration, path routing, translated routes, localized slugs, negotiated locales, custom resolvers, preferences, signed URLs, hreflang, diagnostics and upgrading from 1.x.