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!
Make sure you have messages.gr.xliff file in Resources/Translations folder. After adding languages always clear the cache.