开发者

IE8 problem with multilingual website

Hi i have develop and deploy one multilingual (english uk and swedish) website at India in following server

Intel® Xeon® Processor, 2.0开发者_如何学编程0+ GHz 4 GB RAM 350+ GB HDD (usable hard disk space) Windows Server 2008 standard edition Oracle 10g Standard Edition

When user at sweden is accessing website from sweden they are facing following problem

Culture 'sv' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture

One point i had observed during analysis is that the language of their browser is Svenska[sv] but i never found such language at my browser in India here two language are available for sweden Swedish Finland(sv-FI) and Swedish(sv-SE).

Can any one help me to find out cause of problem? How should i proceed further? I have never seen Svenska[sv] in my browser language option.


Swedish [sv] is certainly listed as an available generic langauge in my browsers. It's normal to specify both a specific language and a generic one as fallback, eg. en-gb,en. In any case the user may add any arbitrary language name like potato-PANTS to the Accept-Language header so you should certainly not be blindly setting CurrentCulture from it on the server side.

Instead, check whether it matches any known-supported language values for your site, and maps those to known-good cultures. So for your example, check if any sv language is listed in the header and use sv-SE if so, otherwise default to en-GB.


Set the CurrentUICulture of current thread instead of CurrentCulture.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜