ggirtsou
ggirtsou

Reputation: 2048

Trying to set symfony locale to something else than fr and en_US

I am trying to make a multi-language application on Symfony2 and I was wondering why when I use this $this->get('session')->setLocale('fr'); it works (finds the file /src/ggirtsou/MyBundle/Resources/Translations/messages.fr.xliff) but when I set it to something like: el_GR it won't work.

I tried many variations (el, GR, EL, GR_el) but none of them worked. Kept getting the non-translated string.

I know I am missing something here and can't figure this out!

Upvotes: 0

Views: 468

Answers (1)

Kosta
Kosta

Reputation: 1867

Make sure you have messages.gr.xliff file in Resources/Translations folder. After adding languages always clear the cache.

Upvotes: 4

Related Questions