umpirsky / i18n-routing-service-provider
Silex i18n routing service provider.
Installs: 1 725
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 4
Open Issues: 0
Requires
- silex/silex: 1.0.*
Requires (Dev)
- symfony/translation: 2.1.*
Suggests
- symfony/translation: 2.1.*
This package is not auto-updated.
Last update: 2024-12-21 15:08:37 UTC
README
symfony upgrade fixer • twig gettext extractor • wisdom • centipede • permissions handler • extraload • gravatar • locurro • country list • transliterator
I18n Routing Service Provider
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.