Download the PHP package umpirsky/i18n-routing-bundle without Composer
On this page you can find all versions of the php package umpirsky/i18n-routing-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download umpirsky/i18n-routing-bundle
More information about umpirsky/i18n-routing-bundle
Files in umpirsky/i18n-routing-bundle
Package i18n-routing-bundle
Short Description Internationalized routing with minimal performance cost.
License MIT
Informations about the package i18n-routing-bundle
i18n routing bundle • symfony upgrade fixer • twig gettext extractor • wisdom • centipede • permissions handler
UmpirskyI18nRoutingBundle
Internationalized routing with minimal performance cost.
Idea
The idea is to create i18n route for each regular route in the project instead of creating separate route for each locale. On large projects with high number of routes and many locales supported this can lead to explosion of routes and performance issues. With more then 1000 routes and 30+ languages it can be a real problem.
With this bundle and prefix
strategy there is no performance cost. For prefix_except_default
number of routes is doubled, but again, does not depend on number of languages.
Installation
Configuration
Usage
Disabling i18n routing on route level
If you want route not to be localized, you can disable it using i18n
option:
Strategies
There are multiple routing strategies supported.
prefix
This will prefix all urls with given locales:
Configuration:
prefix_except_default
This will prefix all urls with given locales except default:
Configuration:
Example
There is example integration with Symfony Standard Edition.
Inspiration
This bundle is inspired by JMSI18nRoutingBundle and BeSimpleI18nRoutingBundle, but sacrifices the url translation feature for the sake of performance.