Hi Fabien,

I have another problem with Translation. I switch to another locale (ex: en_US) 
work but if i would like to return to my default locale, this is not work.

$this['request']->getSession()->setLocale('en_US'); ==> OK
$this['request']->getSession()->setLocale('fr_CH');  ==> NOT OK

My config:
app.config:
    ...
    session:
        storage_id:     native
        default_locale: fr_CH
        name:           xxxx
        lifetime:       3600
    translator:
        enabled:        true
        fallback:       fr_CH

If i paste the default value (fr_CH) on setLocale, the locale attribute doesn't 
change because, you are this test "$locale === $this->getDefaultLocale()".

class Session
{
    ...
    
    public function setLocale($locale)
    {
        if ($locale === $this->getDefaultLocale()) {
            return;
        }

        if (false === $this->started) {
            $this->start();
        }

        $this->attributes['_locale'] = $locale;
    }
}

is it possible to default this test ?

Thanks for your help

Bertrand

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to