Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Is there a way to toggle locales on the frontend?
In Canada we have some pretty strict rules that require EN and FR interfaces to web apps and content. I'm working on an internal company forum, and would like to be able to toggle the Locale between English and French. We do not want to run 2 separate forums.
I've tried setting $Configuration['Garden']['Locale'] = 'fr-FR'; but it seems to be cached, or saved somewhere else, because even when the config has changed, it seems that something else is needed before I see the changes. Is there a function or method I need to trigger to get it to toggle over?
Thanks.
I've tried setting $Configuration['Garden']['Locale'] = 'fr-FR'; but it seems to be cached, or saved somewhere else, because even when the config has changed, it seems that something else is needed before I see the changes. Is there a function or method I need to trigger to get it to toggle over?
Thanks.
Tagged:
1
Comments
May be it is stored to libraries.
Such function could be useful not to Canada only.
I'll have people browsing the forum in both languages simultaneously, is this going to be an issue IF I get it working? Does the caching take the language into consideration?
for code:
Gdn::FactoryInstall('Dummy', 'Gdn_Dummy', PATH_LIBRARY_CORE.DS.'class.dummy.php', Gdn::FactorySingleton);
I think this is place where locale is set.
But it looks like it uses your setting in config.
May be you could use some parameter like "?lang=fra" and look for it here and switch to 'Garden.LocaleAlt' setting in this case.
Inform me if you'll find how to do this, ok?