Jul 12, 2007 05:15 PM|ps2goat|LINK
I had never tried to set this myself, so I never ran into this problem before. I know that in order to set a specific culture, you need to set the region (i.e. en-US is the US version of English, which helps with formatting like using $ instead of British
So, you can either let the user select a country from another list box and append that country code, or set an arbitrary default that everyone must use, such as Spanish for Spain. The latter is what you would be doing, anyway. However, in the terms of
globalization, I think that someone with their browser set to Spanish for Mexico would actually get English (or whatever the default language is).
Another workaround would be to not set the UICulture or Culture properties (at least not he Culture property, as that is causing your error). I tested the following code (no controls, to be concise) and it worked:
Protected Overrides Sub InitializeCulture()
System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CreateSpecificCulture("es")
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("es")