Dear all,
I have written a simple localized application in ASP.NET. In my
global.asax I initialize CurrentUICulture with the culture found in
Request.UserLanguages(0).
On my test system, the culture is en-US, so my application switches to
en (fallback process) for which I have created a resource satellite
assembly. CurrentUICulture.Name seems to stay at 'en-US' though, while
I depend on the CurrentUICulture.Name in paths (e.g. for localized
images), and expect it to be 'en'!
What can I do to make this work? Can I determine which culture has
eventually been chosen, even when fallback is used? Or is there a
better solution to this?
Any suggestions are welcome.
Thank you in advance.
Freek Versteijn.
Michael (michka) Kaplan [MS] - 10 Jan 2005 15:44 GMT
Well, you want CurrentCulture to be a specific culture; if you want
CurrentUILanguage to be neutral then that is straightforward enough; just
set the CurrentCulture with the Request.UserLanguages(0) using the
CreateSpecificCulture method. You could then use the Parent to find the
neutral culture.
One warning -- you will want some exception handling in place to take care
of the times that "zh" happens to be in accept language (since its not a
valid culture). This would apply to other "invalid" strings as well.

Signature
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Microsoft Windows International Division
This posting is provided "AS IS" with
no warranties, and confers no rights.
> Dear all,
>
[quoted text clipped - 16 lines]
>
> Freek Versteijn.