Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. protected void Application_BeginRequest(object sender, EventArgs e)
  2. {
  3. var cultureName = HttpContext.Current.Request.UserLanguages[0];
  4. Thread.CurrentThread.CurrentUICulture = new CultureInfo(cultureName);
  5. }
  6.  
  7. <system.web>
  8. <!--If enableClientBasedCulture is true, ASP.NET can set the UI culture and culture for a Web page automatically, based on the values that are sent by a browser.-->
  9. <globalization enableClientBasedCulture="true" culture="auto:en-US" uiCulture="auto:en"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement