SetCurrentLocale is not persistent after logging off

SetCurrentLocale is not persistent after logging off

  

I have an application build in English, but with a translation to Dutch. There are anonymous and registered pages. If I delete all my cookies and go to the website, the following occurs:

  • I go to the site and the function SetCurrentLocale is called in the OnSessionStart which results in a Dutch website. I can click around all the anonymous pages and everuthing is in Dutch.
  • I login and the function SetCurrentLocale is called again in the OnSessionStart which results in a Dutch website. I can click around all the registered and anonymous pages and everuthing is in Dutch.
  • I log off and the function SetCurrentLocale is called in the OnSessionStart which results in one Dutch page, namely the page the logoff action is redirecting to. However, if I now go a next page, the application is in English. So, in the OnSessionStart that started after I logged off the SetCurrentLocale has been set for one page only so it seems. 

I've searched for this specific behaviour on the forums, but I couldn't find a topic on it. Is this a known issue to anyone? 

I have an application build in English, but with a translation to Dutch. There are anonymous and registered pages. If I delete all my cookies and go to the website, the following occurs:

  • I go to the site and the function SetCurrentLocale is called in the OnSessionStart which results in a Dutch website. I can click around all the anonymous pages and everuthing is in Dutch.
  • I login and the function SetCurrentLocale is called again in the OnSessionStart which results in a Dutch website. I can click around all the registered and anonymous pages and everuthing is in Dutch.
  • I log off and the function SetCurrentLocale is called in the OnSessionStart which results in one Dutch page, namely the page the logoff action is redirecting to. However, if I now go a next page, the application is in English. So, in the OnSessionStart that started after I logged off the SetCurrentLocale has been set for one page only so it seems. 

I've searched for this specific behaviour on the forums, but I couldn't find a topic on it. Is this a known issue to anyone? 

I've not encountered this before, but then again, almost always I have logged-in users. Can you debug this and place a few GetCurrentLocales() in strategic places (e.g. the Preperations of all screens this affects?). You might be able to see when the locale flips back to English.

I know "solved" the issue by using a SetCurrentLocale on the preparation of the menu. It's now solved, but not in a nice way. The GetCurrentLocale was also added to the header and I see that it changes to EN-US fron the second page after the logoff on. 

I know "solved" the issue by using a SetCurrentLocale on the preparation of the menu. It's now solved, but not in a nice way. The GetCurrentLocale was also added to the header and I see that it changes to EN-US fron the second page after the logoff on. 

I have the same problem with CurrentLocale. For some reason after log off the current locale is lost. OnBeginWebRequest i set the locale again. Since i did a logout im sent to NoPermission and the locale here is correct. On the preparation of NoPermission screen i'm redirect to a externalUrl (the login page). and on that screen the locale is wrong. For some reason this beavihour only happen every 2 logout. anyone have a good solution to this problem? or the only solution is to set the locale again?

Hi Marcelo,

The current locale being lost after logoff is understandable, as the current locale is kept in the session (which gets lost after logoff). Anonymous users also have a session, but it is possible the session is refreshed or a new session is started under some circumstances. I'd indeed advise you to add a SetCurrentLocale to the Preperation of the login page.