Re: Language pack resources aren't used
- From: "Cor Ligthert[MVP]" <Notmyfirstname@xxxxxxxxx>
- Date: Sat, 2 May 2009 19:32:35 +0200
Hi Peter,
I have tried it, since short I have installed an English OS on my computer, I see now the same behaviour as you told.
As far as I remembered it me when I was using a Dutch OS it was going right to English.
I have reported this on Connect.
Cor
"Peter Gibbons" <Peter@xxxxxxxxxxxxx> wrote in message news:%23YAQhTzyJHA.3872@xxxxxxxxxxxxxxxxxxxxxxx
Hi Cor,
you can see that casing doesn't matter by stepping into the framework code. It's at the beginning of the CultureInfo constructor.
Any other ideas about the wrong DisplayNames? Did you try my example code?
Regards,
Peter
Cor Ligthert[MVP] wrote:You are right,
I always make this mistake, did you try it or are you only assuming?
Cor
"Peter Gibbons" <Peter@xxxxxxxxxxxxx> wrote in message news:%23fT8WgvyJHA.3872@xxxxxxxxxxxxxxxxxxxxxxxHerllo Cor,
in the documentation the opposite casing like you use is mentioned <http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.80).aspx>. I assume casing isn't relevant.
Any other ideas why the DisplayNames aren't correct with CurrentUICulture different from the current system/user settings?
Regards,
Peter
Cor Ligthert[MVP] wrote:Peter,
I don't know if it matters but I always use "NL-nl" or things like that (first in uppercase and second in lowercase)
Cor
"Peter Gibbons" <Peter@xxxxxxxxxxxxx> wrote in message news:Org%23VRqyJHA.4136@xxxxxxxxxxxxxxxxxxxxxxxHello,
I have a localized german Windows XP SP3 with .Net 3.5 SP1 and german and french language packs for the Framework installed.
When I use the following code the DisplayName information for the ga-ie culture I get the NativeName instead of the localized ones for the CurrentUICultures I have previously set, except for de-de.
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name)
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("de-de")
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name & ": " & (New System.Globalization.CultureInfo("ga-ie")).DisplayName)
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name & ": " & (New System.Globalization.CultureInfo("en-ie")).DisplayName)
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("fr-fr")
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name & ": " & (New System.Globalization.CultureInfo("ga-ie")).DisplayName)
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name & ": " & (New System.Globalization.CultureInfo("en-ie")).DisplayName)
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("en-us")
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name & ": " & (New System.Globalization.CultureInfo("ga-ie")).DisplayName)
MsgBox(System.Threading.Thread.CurrentThread.CurrentUICulture.Name & ": " & (New System.Globalization.CultureInfo("en-ie")).DisplayName)
I've also tested with the Windows 7 RC + all operating system language packs installed and I only get the correct localized DisplayNames for the CurrentUICulture that is the current users default.
For example, when I install the spanish and japanese Windows 7 language packs I have to set the whole user profile to spanish or japanese to get the localized DisplayNames.
How can I retrieve the localiued DisplayNames without changing the system/user profile?
It shouldn't matter what system (XP/Vista/7/x86/x64) you use to reproduce this but you should have at least 2 languages for .Net installed. Either through a .Net language pack (like http://www.microsoft.com/downloads/details.aspx?displaylang=fr&FamilyID=8489ed13-b831-4855-96f7-dd35e4c02a20) or with Vista and obove an operating system MUI pack.
Kind regards,
Peter
.
- Follow-Ups:
- Re: Language pack resources aren't used
- From: Peter Gibbons
- Re: Language pack resources aren't used
- From: Michael Williams
- Re: Language pack resources aren't used
- References:
- Language pack resources aren't used
- From: Peter Gibbons
- Re: Language pack resources aren't used
- From: Cor Ligthert[MVP]
- Re: Language pack resources aren't used
- From: Peter Gibbons
- Re: Language pack resources aren't used
- From: Cor Ligthert[MVP]
- Re: Language pack resources aren't used
- From: Peter Gibbons
- Language pack resources aren't used
- Prev by Date: Re: Creating a .NET DLL
- Next by Date: Re: Setting based 1 Arrays
- Previous by thread: Re: Language pack resources aren't used
- Next by thread: Re: Language pack resources aren't used
- Index(es):
Relevant Pages
|