PHPackages                             paragraph1/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. [Localization &amp; i18n](/categories/localization)
4. /
5. paragraph1/i18n-routing-service-provider

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

paragraph1/i18n-routing-service-provider
========================================

Silex i18n routing service provider. Forked from ehibes/I18nRoutingServiceProvider

v1.0(10y ago)024MITPHP

Since Sep 14Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Paragraph1/I18nRoutingServiceProvider)[ Packagist](https://packagist.org/packages/paragraph1/i18n-routing-service-provider)[ RSS](/packages/paragraph1-i18n-routing-service-provider/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

I18n Routing Service Provider
[![Build Status](https://camo.githubusercontent.com/990da41a6e1799faebd1ab2cbbc4b56e2be16be315eba764224e8b1da4c4888c/68747470733a2f2f7472617669732d63692e6f72672f506172616772617068312f4931386e526f7574696e675365727669636550726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Paragraph1/I18nRoutingServiceProvider)[![Coverage Status](https://camo.githubusercontent.com/c9d8e5c9bae7da9f811e10f3247e47ceffb404fcf0b0d8d036e2627f8d9863c8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f506172616772617068312f4931386e526f7574696e675365727669636550726f76696465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Paragraph1/I18nRoutingServiceProvider?branch=master)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#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 2

[](#silex-2)

```
{
    "require": {
        "paragraph1/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', 'eu', 'fr');

// You can translate patterns
$app['translator.domains'] = array('routes' => array(
    'fr' => array('test_route' => '/entsegu-bat'),
));

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

Matched URLs will be:

`/en/test` - url for default locale without prefix

`/eu/entsegu-bat` - url with prefix and translated

`/fr/test` - url with prefix

Disable I18n for a route
========================

[](#disable-i18n-for-a-route)

```
$app->get('/dont-translate', function() {
    //...
})->bind('my_route')->getRoute()->setOption('i18n', false);

# Careful when using Silex\Provider\TranslationServiceProvider

```php
$app = new Application();
// when also using TranslationServiceProvider add your routes when registering it:
$app->register(new Jenyak\I18nRouting\Provider\I18nRoutingServiceProvider());
...
$app->register(new \Silex\Provider\TranslationServiceProvider(), array(
    'locale_fallbacks' => array('en'),
    'translator.domains' => array(
        'fr' => array('test_route' => '/entsegu-bat')
    )
));
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 68.8% 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 ~165 days

Total

3

Last Release

3612d ago

### Community

Maintainers

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

---

Top Contributors

[![jenyak](https://avatars.githubusercontent.com/u/2803849?v=4)](https://github.com/jenyak "jenyak (22 commits)")[![palbertini](https://avatars.githubusercontent.com/u/2226651?v=4)](https://github.com/palbertini "palbertini (5 commits)")[![ehibes](https://avatars.githubusercontent.com/u/487124?v=4)](https://github.com/ehibes "ehibes (3 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/paragraph1-i18n-routing-service-provider/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M380](/packages/easycorp-easyadmin-bundle)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

185701.7M5.5k](/packages/nesbot-carbon)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

44311.1M75](/packages/jms-translation-bundle)[symfony/ux-translator

Exposes Symfony Translations directly to JavaScript.

26735.1k7](/packages/symfony-ux-translator)[symfony/crowdin-translation-provider

Symfony Crowdin Translation Provider Bridge

13558.9k1](/packages/symfony-crowdin-translation-provider)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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