PHPackages                             justijndepover/laravel-localized-routes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. justijndepover/laravel-localized-routes

ActiveLibrary[Localization &amp; i18n](/categories/localization)

justijndepover/laravel-localized-routes
=======================================

Setup your Laravel application with localized routes

0.5.0(5mo ago)11.1k[2 issues](https://github.com/justijndepover/laravel-localized-routes/issues)MITPHP

Since Mar 26Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/justijndepover/laravel-localized-routes)[ Packagist](https://packagist.org/packages/justijndepover/laravel-localized-routes)[ RSS](/packages/justijndepover-laravel-localized-routes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Laravel Localized Routes
========================

[](#laravel-localized-routes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0fa877dfee8581f3f2f19ebc57ce86bf2127bc5ca1425852dabab993ecc685af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a757374696a6e6465706f7665722f6c61726176656c2d6c6f63616c697a65642d726f757465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/justijndepover/laravel-localized-routes)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/64b801d882d6720768c4b4394b219647d51bb9cfbb6a811d74e8dd68b47452d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a757374696a6e6465706f7665722f6c61726176656c2d6c6f63616c697a65642d726f757465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/justijndepover/laravel-localized-routes)

Setup your Laravel application with localized routes

Caution
-------

[](#caution)

This application is still in development and could implement breaking changes. Please use at your own risk.

Installation
------------

[](#installation)

You can install the package with composer

```
composer require justijndepover/laravel-localized-routes
```

After installation you should publish your configuration file

```
php artisan vendor:publish --tag="laravel-localized-routes-config"
```

configuration
-------------

[](#configuration)

This is the config file

```
return [

    /**
     * This global setting can enable / disable the entire localization package.
     */
    'enable_localized_routes' => true,

    /**
     * This list contains all the available locales.
     * Simply add your own locale and thats it!
     */
    'locales' => [
        'en' => 'English',
        'nl' => 'Nederlands',
    ],

    /**
     * Automatically detect locales
     *
     * With this setting enabled, you can automatically detect locales.
     * The middleware to do so will check the request for a "locale" header
     *
     * useful for api's, where you don't want the locale prefix,
     * but still want to set the application locale
     */
    'auto_detect_locales' => true,

    /**
     * Automatically redirect requests if the localized version exists
     *
     * With this setting enabled, your requests will automatically redirect
     * to their localized counterpart.
     *
     * For example: /home => /en/home
     */
    'auto_redirect_to_localized_route' => true,

];
```

Usage
-----

[](#usage)

To make your routes multi lingual add this in your `web.php`:

```
Route::localized(function () {
    // Every route in here is localized
});
```

and thats it! You can still give your routes a name like you're used to:

```
Route::localized(function () {
    Route::get('home', HomeController::class)->name('home');
});
```

```

Home

```

If you want to switch to a different localized route, you can do so with the `switchLanguage` function.

```
switchLanguage('fr'); // will return the current route, but the localized part is substituted with the new language
```

Related repositories
--------------------

[](#related-repositories)

This package is a simplified version of: [codezero-be/laravel-localized-routes](https://github.com/codezero-be/laravel-localized-routes)

If you want a more robust solution with more options, check out their version.

Security
--------

[](#security)

If you find any security related issues, please open an issue or contact me directly at [justijndepover@gmail.com](justijndepover@gmail.com).

Contribution
------------

[](#contribution)

If you wish to make any changes or improvements to the package, feel free to make a pull request.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance52

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~428 days

Total

5

Last Release

160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5fd4c17cd9a949c54389523f946b831dc15b819daef69aee26e545bd05adc69?d=identicon)[justijndepover](/maintainers/justijndepover)

---

Top Contributors

[![justijndepover](https://avatars.githubusercontent.com/u/9008623?v=4)](https://github.com/justijndepover "justijndepover (10 commits)")

---

Tags

hacktoberfestlaravellocalizationphp

### Embed Badge

![Health badge](/badges/justijndepover-laravel-localized-routes/health.svg)

```
[![Health](https://phpackages.com/badges/justijndepover-laravel-localized-routes/health.svg)](https://phpackages.com/packages/justijndepover-laravel-localized-routes)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
