Last post May 21, 2010 04:49 PM by fiercemuppet
May 04, 2010 01:54 AM|FierceMuppet|LINK
I am having problems with localization. I am trying to use HttpContext.Current.Request.UserLanguages. With a bare-bones page, when I get to a page the first time, this collection has a length of one and is showing en-us. When I refresh the page, I get
the complete list of languages in my browser. This only happens with IE, not FF.
May 04, 2010 04:50 AM|Das.Sandeep|LINK
Genally such problem occur when you are setting some value from code in web.config, so it is developer fault, check in you codeanything are you setting in web.config like langauge, culture etc. So due to thsi your application restart due to this happening.
Just find your code.
May 04, 2010 11:24 AM|FierceMuppet|LINK
I do not see any setting for culture or language in web.config at all. Any idea where to look?
I created a barebone site with one page and the default web.config and it still fails.
The odd thing is that if I go to the url from a favorite in the browser, it works fine. If I access the link from the history drop down it works fine.
If I access the link from an email in Outlook, it fails and only shows en-us.
May 04, 2010 08:53 PM|Das.Sandeep|LINK
Do one thing just send me part of the code in which you are setting culture based on changed language.
May 05, 2010 10:59 AM|FierceMuppet|LINK
Here is the only code I have in my test page.
protected void Page_Load(object sender, EventArgs e)
string languages = HttpContext.Current.Request.UserLanguages;
for (int j = 0; j < languages.Length; j++)
Response.Write(languages[j] + ",");
I have a whole set of languages in my settings that I use. When the page loads from a link in en email, it only returns en-us. When I refresh, it lists the entire set of languages.
May 21, 2010 04:49 PM|FierceMuppet|LINK
It turns out that there is a problem with IE and Languages.
The frustrating thing is that this was not working a few weeks ago. When it worked today, I had only 3 languages in my browser since I needed to test something.
When this was not working, I had about 24 set in my browser since my site is localized in all those languages. To see if there is some problem with IE and the amount of languages, I added all 24 back in and sure enough they do not show up when I first load
the page. I kept lowering the count until I had 7 and then it worked. I do not know if it is the count of languages or the type. I tried with a combination of single and double-byte languages and it still errors at 8.
I know someone at Microsoft and that has been reported to the IE team.