I was reading a resource that said:
CurrentUICulture must be set at the startup of a application.
For an ASP.NET web page, where do I set this property appropriately?
In a web page, you can set Culture and UICulture in the page directive:
<%@ Page .... Culture="en-US" UICulture="en-US" %>
It doesn't have to be set at application startup.
Update: And as Kristof Claes mentions in a comment, you can set it in code during Page_Init:
System.Threading.Thread.CurrentThread.CurrentCulture =
new System.Globalization.CultureInfo("en-US");
System.Threading.Thread.CurrentThread.CurrentUICulture =
new System.Globalization.CultureInfo("en-US");
Web.config:
<globalization culture="en-US" uiCulture="en" requestEncoding="utf-8" responseEncoding="utf-8" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With