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.6.0(2mo ago)11.1k[2 issues](https://github.com/justijndepover/laravel-localized-routes/issues)MITPHP

Since Mar 26Pushed 2mo 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 today

READMEChangelog (6)Dependencies (4)Versions (7)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

36

—

LowBetter than 79% of packages

Maintenance65

Regular maintenance activity

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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 ~369 days

Recently: every ~461 days

Total

6

Last Release

78d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9008623?v=4)[Justijn Depover](/maintainers/justijndepover)[@justijndepover](https://github.com/justijndepover)

---

Top Contributors

[![justijndepover](https://avatars.githubusercontent.com/u/9008623?v=4)](https://github.com/justijndepover "justijndepover (11 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

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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