0

The language of all sessions changes when the resource file is applied but people who speak different languages are connected.

I put a language change code on the index page that I first access to.

string[] languages = HttpContext.Current.Request.UserLanguages;
string mCulture = languages[0];

PORTAL_Character.Res.Culture =System.Globalization.CultureInfo.CreateSpecificCulture(mCulture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(mCulture);
Thread.CurrentThread.CurrentCulture = new CultureInfo(mCulture);    

When a user with a different language connects, it changes the language of an existing user.

Is there a way to apply resource files per session?

Kimgt
  • 3
  • 3
  • Possible duplicate: https://stackoverflow.com/questions/8487856/setting-culture-for-session – Hans Kesting May 09 '19 at 10:52
  • I check this code but when create new session by another user its changed another user language – Kimgt May 09 '19 at 10:56
  • According to the answer to that question, you cannot set the culture once and forget about it. You need to set that culture for *every* request (and early on) – Hans Kesting May 09 '19 at 11:09
  • for example The placeholder cannot convert my resources. Of course <%=PORTAL.Res.TEST %> This form is normally converted. – Kimgt May 10 '19 at 01:43

0 Answers0