Resources: How to retrieve localized resource?

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
 
S

Steven Cheng[MSFT]

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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top