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(1y ago)514MITPHPPHP &gt;=7.4

Since Mar 28Pushed 1y 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 1mo ago

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

22

—

LowBetter than 23% of packages

Maintenance33

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

696d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aded16aa0933ff5531b3f5898075e440488475261be8995009121960f0751ed?d=identicon)[cevin](/maintainers/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

[mcamara/laravel-localization

Easy localization for Laravel

3.5k9.1M111](/packages/mcamara-laravel-localization)[typicms/base

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

1.6k20.3k](/packages/typicms-base)[vemcogroup/laravel-translation

Translation package for Laravel to scan for localisations and up/download to poeditor

135304.0k2](/packages/vemcogroup-laravel-translation)

PHPackages © 2026

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