You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to nette v.3.1.10 and translation v.3.0.6 I have a problem that locale is always resolved to "en", regardless of resolvers results.
Here is my config.neon:
My browser locale is 'fr', but the website is opened in English, and here is what I see in the tracy debugger:
Order of locale resolvers and final locale for each request
Main:default
en
1.
LocaleParamResolver
2.
AcceptHeaderResolver
fr
Even when I try force French locale by opening my website like this: https://example.com/fr, it's still opened in English, and here is what I see in the tracy debugger:
Order of locale resolvers and final locale for each request
Main:default
en
1.
LocaleParamResolver
fr
2.
AcceptHeaderResolver
fr
Before upgrade everything worked good. Maybe now I need to change something in the code, but I don't know what. Please help :)
The text was updated successfully, but these errors were encountered:
public function getLocale()
{
if (empty(parent::getLocale())) {
$this->setLocale($this->localeResolver->resolve($this));
}
return parent::getLocale();
}
Now the condition of if is always false. Because now symphony translator if ((bool) $this->locale) is false returns \Locale::getDefault() or 'en' ;
Hello,
After upgrading to nette v.3.1.10 and translation v.3.0.6 I have a problem that locale is always resolved to "en", regardless of resolvers results.
Here is my config.neon:
Here is my RouterFactory:
My browser locale is 'fr', but the website is opened in English, and here is what I see in the tracy debugger:
Order of locale resolvers and final locale for each request
Even when I try force French locale by opening my website like this: https://example.com/fr, it's still opened in English, and here is what I see in the tracy debugger:
Order of locale resolvers and final locale for each request
Before upgrade everything worked good. Maybe now I need to change something in the code, but I don't know what. Please help :)
The text was updated successfully, but these errors were encountered: