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

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

ehibes/silex-i18n-routing-service-provider
==========================================

Silex i18n routing service provider.

1.0.x-dev(10y ago)140MITPHP

Since Feb 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ehibes/silexI18nRoutingServiceProvider)[ Packagist](https://packagist.org/packages/ehibes/silex-i18n-routing-service-provider)[ RSS](/packages/ehibes-silex-i18n-routing-service-provider/feed)WikiDiscussions 1.0 Synced 3w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

I18n Routing Service Provider [![Build Status](https://camo.githubusercontent.com/779c0888dabd3e24c58c87acbad1b0eac9571a5e8d88892bd35ef24cf3ef9b99/68747470733a2f2f7472617669732d63692e6f72672f6568696265732f73696c65784931386e526f7574696e675365727669636550726f76696465722e7376673f6272616e63683d312e30)](http://travis-ci.org/ehibes/silexI18nRoutingServiceProvider)
========================================================================================================================================================================================================================================================================================================================================================================

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

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

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": {
        "ehibes/i18n-routing-service-provider": "~1.0"
    }
}

```

### Silex 2

[](#silex-2)

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

```

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

[](#registering)

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

Parameters
==========

[](#parameters)

- **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 Ibes\I18nRouting\Provider\I18nRoutingServiceProvider());
$app['locale'] = 'en';
$app['i18n_routing.locales'] = array('en', 'eu', 'fr');

// There's no need to put {_locale} in route pattern
$app->get('/test', function () {
   //...
})->bind('test_route')->getRoute()->setOption('i18n', array('eu' => 'entsegu-bat'));
```

Matched URLs will be:

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

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

`/fr/test` - url with prefix

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

3796d ago

### Community

Maintainers

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

---

Top Contributors

[![ehibes](https://avatars.githubusercontent.com/u/487124?v=4)](https://github.com/ehibes "ehibes (3 commits)")

---

Tags

silexi18n routing

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[moriony/silex-mongo-provider

Mongo service provider for the Silex framwork.

118.5k](/packages/moriony-silex-mongo-provider)

PHPackages © 2026

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