Resources: How to retrieve localized resource?

  • Thread starter Thread starter Axel Dahmen
  • Start date Start date
A

Axel Dahmen

Hi,

I've created a class library assembly containing several string resource files, like:

- TableColumns.resx
- TableColumns.de.resx
- General.resx
- General.de.resx

I don't know how to address each of these having automatic language fall-back enabled.

If I write...

new ResourceManager("TableColumns",...GetExecutingAssembly()).GetString("someID");

....I always only get strings from TableColumns.resx, but not from TableColumns.de.resx, although CurrentCulture.Name yields "Germany".

What am I doing wrong?

TIA,
Axel Dahmen
 
Hi Axel,

Regarding on this issue, I've found your another thread in the following
newsgroup:

Subject: Resources: How to retrieve localized resource?
Date: Fri, 30 Nov 2007 03:06:01 -0800
Newsgroups: microsoft.public.dotnet.languages.csharp

I have posted some suggestion there. Please have a look there and welcome
to continue followup in that thread.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Axel Dahmen" <[email protected]>
Subject: Resources: How to retrieve localized resource?
Date: Sat, 1 Dec 2007 14:20:14 +0100

Hi,
I've created a class library assembly containing several string resource files, like:
- TableColumns.resx
- TableColumns.de.resx
- General.resx
- General.de.resx
I don't know how to address each of these having automatic language fall-back enabled.
If I write...
new ResourceManager("TableColumns",...GetExecutingAssembly()).GetString("someID"
);
...I always only get strings from TableColumns.resx, but not from
TableColumns.de.resx, although CurrentCulture.Name yields "Germany".
 
Back
Top