翻译不适用于symfony2的匿名用户

I have symfony 2.3 and I configured the translation for i18n purpose, putting the _locale in url, and it works well for authenticated users but not for anonymous user, for the anonymous user always give me the default locale, at the profiler the locale appears well but It don't load the proper translation.

Pd: I'm using FOSUserBundle

Please make sure the session has been started for the anonymous user. in your controller check with:

$this->container->get('session')->isStarted()

start session

$this->container->get('session')->start();

If the session is started correctly, verify the locale has been set.

using $this->get() alias for $this->container->get() in further examples.

get the locale

$this->get('session')->get('_locale');

otherwise set the locale

$this->get('session')->set('_locale', 'en_US');