PHPackages                             jenyak/i18n-routing-service-provider - 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. jenyak/i18n-routing-service-provider

ActiveLibrary

jenyak/i18n-routing-service-provider
====================================

Silex i18n routing service provider.

v1.0(10y ago)13.5k8[2 PRs](https://github.com/jenyak/I18nRoutingServiceProvider/pulls)MITPHP

Since Sep 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jenyak/I18nRoutingServiceProvider)[ Packagist](https://packagist.org/packages/jenyak/i18n-routing-service-provider)[ RSS](/packages/jenyak-i18n-routing-service-provider/feed)WikiDiscussions master Synced 1mo ago

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

I18n Routing Service Provider [![Build Status](https://camo.githubusercontent.com/d57451b7658cc57fc78c1520d3a783ab8496f40043c41bb285161702ceacebc5/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6a656e79616b2f4931386e526f7574696e675365727669636550726f76696465722e706e67)](http://travis-ci.org/jenyak/I18nRoutingServiceProvider)
=================================================================================================================================================================================================================================================================================================================================================

[](#i18n-routing-service-provider--)

Silex i18n routing service provider inspired by [JMSI18nRoutingBundle](https://github.com/schmittjoh/JMSI18nRoutingBundle)

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

[](#installation)

Recommended installation is [through composer](http://getcomposer.org). Just add the following to your `composer.json` file:

### Silex 1.3

[](#silex-13)

```
{
    "require": {
        "jenyak/i18n-routing-service-provider": "~1.0"
    }
}

```

### Silex 2

[](#silex-2)

```
{
    "require": {
        "jenyak/i18n-routing-service-provider": "dev-master"
    }
}

```

Registering
===========

[](#registering)

```
$app->register(new Jenyak\I18nRouting\Provider\I18nRoutingServiceProvider());
```

Parameters
==========

[](#parameters)

- **i18n\_routing.translation\_domain**: Translation domain for routes. The default value is `routes`.
- **i18n\_routing.locales**: Routing locales. The default value is `array(en)`.
- **locale**: Default routing locale. The default value is `en`.

Example
=======

[](#example)

```
$app = new Application();
//...
$app->register(new Jenyak\I18nRouting\Provider\I18nRoutingServiceProvider());
$app['locale'] = 'en';
$app['i18n_routing.locales'] = array('en', 'hu', 'ua');

// You can translate patterns
$app['translator.domains'] = array('routes' => array(
    'hu' => array('test_route' => '/teszt'),
));

// There's no need to put {_locale} in route pattern
$app->get('/test', function () {
   //...
})->bind('test_route');
```

Matched URLs will be:

`/test` - url for default locale without prefix

`/hu/teszt` - url with prefix and translated

`/ua/test` - url with prefix

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~136 days

Total

2

Last Release

3757d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6be4bbd625f41707a37d7dbc1ed439ed1837e4d92e4ef9adb9b5dbeb3fa415ce?d=identicon)[jenyak](/maintainers/jenyak)

---

Top Contributors

[![jenyak](https://avatars.githubusercontent.com/u/2803849?v=4)](https://github.com/jenyak "jenyak (18 commits)")[![marcw](https://avatars.githubusercontent.com/u/160332?v=4)](https://github.com/marcw "marcw (2 commits)")

---

Tags

silexi18n routing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jenyak-i18n-routing-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/jenyak-i18n-routing-service-provider/health.svg)](https://phpackages.com/packages/jenyak-i18n-routing-service-provider)
```

PHPackages © 2026

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