PHPackages                             mvccore/ext-router-module-localization - 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. [Framework](/categories/framework)
4. /
5. mvccore/ext-router-module-localization

ActiveLibrary[Framework](/categories/framework)

mvccore/ext-router-module-localization
======================================

MvcCore - Extension - Router - Modules With Localization - extension to manage multiple websites in a single project and to manage website localizations (language or language and locale), optionaly contained in a domain or in URL address in the beginning.

v5.3.1(1y ago)12711BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mvccore/ext-router-module-localization)[ Packagist](https://packagist.org/packages/mvccore/ext-router-module-localization)[ RSS](/packages/mvccore-ext-router-module-localization/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (8)Used By (1)

MvcCore - Extension - Router - Modules With Localization
========================================================

[](#mvccore---extension---router---modules-with-localization)

[![Latest Stable Version](https://camo.githubusercontent.com/f4548b31034f2871a699ddf4e0c7bc5d6262647d641868f7ea7f6a3f3297db5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537461626c652d76352e332e312d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://github.com/mvccore/ext-router-module-localization/releases)[![License](https://camo.githubusercontent.com/53baed538c1c87a033a212f6f4acce684d36137f8622307643ab25e08118452e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)

MvcCore Router extension to manage multiple websites in single project and to manage website localizations (language or language and locale, optionaly contained in URL address domain part or in URL address beinning), defined by domain routes, targeted by module property in URL completing.

This router is the way, how to route your requests in domain level with localization with params or variable sections, namespaces, default param values and more.

Outline
-------

[](#outline)

1. [Installation](#user-content-1-installation)
2. [Features](#user-content-2-features)
3. [How It Works](#user-content-3-how-it-works)
4. [Usage](#user-content-4-usage)

1. Installation
---------------

[](#1-installation)

```
composer require mvccore/ext-router-module-localization
```

[go to top](#user-content-outline)

2. Features
-----------

[](#2-features)

Extension has the same features as extensions bellow together:

- [Features for `mvccore/ext-router-module`](https://github.com/mvccore/ext-router-module#user-content-2-features)
- [Features for `mvccore/ext-router-localization`](https://github.com/mvccore/ext-router-localization#user-content-2-features)

Localization could be contained in any module domain route as param named `` match URL requests like this:

- `http://example.com/anything`
- `http://en.example.com/anything`
- `http://en-US.example.com/anything`
- `http://de-DE.example.com/anything`

```
new \MvcCore\Ext\Routers\Modules\Route([
    "pattern"              => "//[.]example.com",
    "module"               => "main",
    "constraints"          => ["localization" => "-a-zA-Z"],
]);
```

If there is not contained param `` in matched module domain route pattern and matched route (or route to generate URL) is defined as localized route, localization param has to be contained (or is automaticly inserted) in URL address beginning like this:

- `http://example.com/anything`
- `http://example.com/en/anything`
- `http://example.com/en-US/anything`
- `http://example.com/de-DE/anything`How precisely is conained in URL address depends on advanced router configuration like allowed languages and more...

[go to top](#user-content-outline)

3. How It Works
---------------

[](#3-how-it-works)

Extension works in the same way as extensions bellow together:

- [How It Works - `mvccore/ext-router-module`](https://github.com/mvccore/ext-router-module#user-content-3-how-it-works)
- [How It Works - `mvccore/ext-router-localization`](https://github.com/mvccore/ext-router-localization#user-content-3-how-it-works)

Router is composed from traits in extensions named above.

[go to top](#user-content-outline)

4. Usage
--------

[](#4-usage)

### Usage - `Bootstrap` Initialization

[](#usage---bootstrap-initialization)

Add this to `/App/Bootstrap.php` or to **very application beginning**, before application routing or any other extension configuration using router for any purposes:

```
$app = \MvcCore\Application::GetInstance();
$app->SetRouterClass('\MvcCore\Ext\Routers\ModuleLocalization');
...
// to get router instance for next configuration:
/** @var \MvcCore\Ext\Routers\ModuleLocalization $router */
$router = \MvcCore\Router::GetInstance();
```

All other specific usage and advanced configuration is the same as extensions bellow together:

- [More usage and configuration for `mvccore/ext-router-module`](https://github.com/mvccore/ext-router-module#user-content-42-usage---targeting-custom-application-part)
- [More usage and configuration for `mvccore/ext-router-localization`](https://github.com/mvccore/ext-router-localization#user-content-42-usage---default-localization)

[go to top](#user-content-outline)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance41

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

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

Recently: every ~328 days

Total

7

Last Release

521d ago

### Community

Maintainers

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

---

Top Contributors

[![tomFlidr](https://avatars.githubusercontent.com/u/1833722?v=4)](https://github.com/tomFlidr "tomFlidr (36 commits)")

---

Tags

pluginframeworklocalizationlanguageroutesrouterroutingmvcextensionmoduleslocaleplug-inprojectslangmultipleextmulti-languagesitesmvccoremulti-langlanguage versionlocale versionlocalized url

### Embed Badge

![Health badge](/badges/mvccore-ext-router-module-localization/health.svg)

```
[![Health](https://phpackages.com/badges/mvccore-ext-router-module-localization/health.svg)](https://phpackages.com/packages/mvccore-ext-router-module-localization)
```

PHPackages © 2026

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