2
votes

I am using symfony 2.0 for a development, m using the locale names as for example, en_ZA, en_US, en_QA for different languages, Have set en_ZA as default locale using Config.yml,

My urls are called for example as below, for different languages,

http://mydomain.com/en_ZA/user/list

http://mydomain.com/en_QA/user/list

Now when i try to mistype the locale in url like

http://mydomain.com/en_AA/user/list

http://mydomain.com/en_BB/user/list

It uses fallback and returns the default language translations,

BUT it creates problematic when i call for the locales with below urls

http://mydomain.com/en_Za/user/list

http://mydomain.com/en_zA/user/list

http://mydomain.com/en_za/user/list

It just returns the template file with the translation variables. It doesn't returns the fallback nor the translations.

Thank you for any help.

1

1 Answers

0
votes

If you are trying to cover different languages and translations, then I recommend you follow the way Symfony outlines it in their documentation.

Here's a great starter along with links to the documentation.