Skip to content

lschricke/I18nRoutingServiceProvider

 
 

Repository files navigation

I18n Routing Service Provider Build Status

Silex i18n routing service provider.

Parameters

  • translator.domains.route: Translation message domain. The default value is routes.

Usage

To translate route patterns, just register service provider:

<?php

$app->register(new Umpirsky\Silex\I18nRouting\Provider\I18nRoutingServiceProvider());

If you use controller providers you can take advantage of using Umpirsky\Silex\I18nRouting\Application which overrides Application::mount() method in order to translate prefixes. Alternatively, you can do this trick outside of the Application class, read more on dev.umpirsky.com.

In order for this to work, prefixes should be translated separately from patterns.

About

Silex i18n routing service provider.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%