Be careful using Context.Request.UserLanguages(0): 1. It could be null/empty string if the user's browser hasn't set the Accept-Language header 2. It could be an invalid 'Culture Identifier' because you can set the string manually (in InternetExplorer,
at least). I've seen the following submitted as the Accept-Language "ie-EE" which will cause an EXCEPTION if passed to
new CultureInfo("ie-EE"); (see post
147241) 3. It may or may not be a valid Culture - DON'T assume it will always be in the form "en-US" or "ja-JP" -- if the browser sends you "en" and you attempt to assign
Thread.CurrentThread.CurrentCulture = new CultureInfo("en");
craigd
Member
80 Points
16 Posts
Re: localization, user lang
Apr 05, 2004 03:12 AM|LINK
Thread.CurrentThread.CurrentCulture = new CultureInfo("en");you'll get an error (I think). Use , maybe with a try/catch to avoid problem #2. Heaps of references available on this topic. Multi(language)media? Trans-Asia.com!