PHPackages                             cevin/laravel-multi-language - 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. cevin/laravel-multi-language

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

cevin/laravel-multi-language
============================

Laravel Multi Language Route Support

v0.0.2(2y ago)514MITPHPPHP &gt;=7.4

Since Mar 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cevin/laravel-multi-language)[ Packagist](https://packagist.org/packages/cevin/laravel-multi-language)[ RSS](/packages/cevin-laravel-multi-language/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Multi Language Supports for Laravel
===================================

[](#multi-language-supports-for-laravel)

WARNING
-------

[](#warning)

The routing dispatch strategy will be affected, do not apply to production environment without sufficient testing.

All parameters must be explicitly defined in the method's parameter list, and the parameter names must match those defined in the route.

The following call may have an impact.

```
class SomeController extends Controller
{
    // For route: /{a}/{b}/{c}
    // ❌ Method's parameter list is empty.
    public function method()
    {
        $a = func_get_args()[0];
        $b = func_get_args()[1];
        $c = func_get_args()[2];
    }

    // For route: /{a}/{b}/{c}
    // ❌ Parameter name does not match the variable name defined in the route.
    public function method($aa, $bb, $cc)
    {
        // ....
    }

    // For route: /{a}/{b}/{c}
    // ❗️ The number of parameters does not match the number of variables defined in the route.
    public function method($a, $b)
    {
        $c = func_get_args()[2];
    }

    // For route: /{a}/{b}/{c}
    // ✅
    public function method($a, $b, $c)
    {
        // .....
    }

    // For route: /{a}/{b}/{c}
    // ✅
    public function method($c, $a, $b)
    {
        return $c.'-'.$a.'-'.$b;
        // /a/b/c
        // output: c-a-b
    }
}
```

Usage
-----

[](#usage)

```
// AppServiceProvider::boot
URL::defaults(['locale' => 'en-us']);
// route('home.test', ['name'=>'hello']) => /en-us/hello
// route('home.test', ['name'=>'hello', 'locale'=>'fr']) => /fr/hello

// global middleware
...
app()->setLocale($request->route('locale', '...'))
$request->setLocale($request->route('locale', '...'))
...
```

```
use \Illuminate\Support\Facades\Route;

Route::prefix('/{locale?}')
    ->whereIn('locale', ['en-us', 'fr', 'zh-CN', 'zh-HK'])
    ->group(function (\Illuminate\Routing\Router $router) {
        $router->get('/{name}', 'Home@test')->name('home.test');
    });
```

```
// Controller
class Home extends Controller
{
    public function test(\Illuminate\Http\Request $request, string $name)
    {
        $locale = $request->getLocale();
        return $name;
    }
}
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

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

Total

2

Last Release

751d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/338110?v=4)[cevin](/maintainers/cevin)[@cevin](https://github.com/cevin)

---

Top Contributors

[![cevin](https://avatars.githubusercontent.com/u/338110?v=4)](https://github.com/cevin "cevin (8 commits)")

### Embed Badge

![Health badge](/badges/cevin-laravel-multi-language/health.svg)

```
[![Health](https://phpackages.com/badges/cevin-laravel-multi-language/health.svg)](https://phpackages.com/packages/cevin-laravel-multi-language)
```

###  Alternatives

[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.7k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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