Download the PHP package paragraph1/i18n-routing-service-provider without Composer
On this page you can find all versions of the php package paragraph1/i18n-routing-service-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paragraph1/i18n-routing-service-provider
More information about paragraph1/i18n-routing-service-provider
Files in paragraph1/i18n-routing-service-provider
Package i18n-routing-service-provider
Short Description Silex i18n routing service provider. Forked from ehibes/I18nRoutingServiceProvider
License
Informations about the package i18n-routing-service-provider
I18n Routing Service Provider

Silex i18n routing service provider inspired by JMSI18nRoutingBundle
Installation
Recommended installation is through composer. Just add
the following to your composer.json
file:
Silex 2
{
"require": {
"paragraph1/i18n-routing-service-provider": "dev-master"
}
}
Registering
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
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
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') ) ));