I'm developing a site with Symfony2 v.2.5.0-dev and i'm trying to internationalize it.
It works fine in english (mysite.com/en/)
and french (mysite.com/fr/)
but for catalan and spanish only works with URLs like mysite.com/ca_ES/
and mysite.com/es_ES/
but I need to use the short language codes: ca
and es
.
The default language is Catalan.
I've created 4 files in src/MyProject/MyBundle/Resources/translations
with name:
- messages.ca.yml
- messages.es.yml
- messages.en.yml
- messages.fr.yml
And enabled the translator:
#app/config/config.yml
framework:
translator: { fallback: ca }
default_locale: %locale%
#app/config/parameters.yml
parameters:
...
locale: ca
I'd made before some other projects in Symfony2 v.2.3.x without this problem.
What I'm doing wrong?