Last post Jan 28, 2008 05:41 PM by Motley
Jan 24, 2008 05:11 AM|pbb|LINK
I am trying to localize a website for Nynorsk (nn-NO, which is the second official language in Norway). The problem is, while Internet Explorer sends the right code, Firefox (most current version) only sends "nn".
ASP.NET's internal internationalization routines don't accept this. Creating a /App_GlobalResources/Resource.nn.resx file throws a compilation error (CS0101: The namespace 'Resources' already contains a definition for 'Resource'), and querying Thread.CurrentThread.CurrentCulture.Name
inside InitializeCulture() even returns "nb-NO" (Bokmål, which is Norway's primary official language).
Does anybody know how to handle this? Is there a way I can catch the "nn" before it is converted into "nb-NO" by ASP.NET, so that I can properly transform it into "nn-NO"?
Accept-Language localization Firefox IE7
Jan 24, 2008 07:01 AM|pbb|LINK
Ok, it's not only Firefox. Opera even goes as far as sending "no-nyn" as language code, which is also not understood by ASP.NET. This seems like a pretty significant problem,but I can't find any information about it on internet...
Anybody who can help me?
Jan 25, 2008 03:10 AM|satishambition|LINK
Check if firefox support "nb-NO" culture or not .
Go to Firefox - Tools - Options - Languages- choose- and check in the dropdown list.
I think Firefox doesn't support "nb-NO" culture
Jan 25, 2008 06:46 AM|pbb|LINK
Firefox supports both Bokmål (nb-no in ASP.NET) and Nynorks (nn-no in ASP.NET), but calls them just "nb" and "nn" respectively...
Both of these (nb and nn) are interpreted as Bokmål by ASP.NET.
Jan 28, 2008 05:41 PM|Motley|LINK
Yes, you can create a custom base page. In that page, override the InitializeCulture subroutine, and you have complete access to the request object at the point, and can set the culture to anything you want.
Then have all your other pages inherit from that page instead of System.UI.Page.
However, in ASP.NET the parent culture of "nb-NO" is "no" which is the generic norweign culture. Therefore the fallback rules for nb-NO would be: nb-NO -> no -> website default.
I'm afraid I'm not well versed enough in norweign or the relationships of the primary/secondary languages used there to be of much help.