Link to home
Start Free TrialLog in
Avatar of sybe
sybe

asked on

How do you handle LCID issues in ASP.Net?

Just switched from Classic ASP to ASP.Net.

I am a bit lost in how to use to handle to LCID setting in ASP.Net. Most application I write are for a Dutch audience (LCID = 1043). On the other hand I don't want to have everything in Dutch while developing, because that also produces error messages in Dutch and those are quite useless when searching on error messages.

In Classic ASP (VBScript) I did often use the SetLocale function. The good thing of that is that it can be changed for every line of code. The SetLocale function seems not to be available in ASP.Net.

My question: how do you handle LCID issues in ASP.Net.

To be more concrete, in the following case:

The application sends an email. The email is in Dutch. The email contains date, which come from a database and need to be formatted with Dutch LCID (with the FormatDateTime() function). But - as I said - if there are any runtime errors on the page, I want to see them in US-EN.


ASKER CERTIFIED SOLUTION
Avatar of AmarIs26
AmarIs26

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sybe
sybe

ASKER

Thanks. I was hoping for some input from more people, but since you have been the only one to answer, I'll accept your answer.

I am not so sure if it is handy to change the language of a page every time I see an error. The solution I found for setting LCID temporary to something is:

System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("nl-NL")