all groups > dotnet compact framework > august 2006 >
You're in the

dotnet compact framework

group:

Strongly typed resource strings in CF2


Strongly typed resource strings in CF2 polly.dixon NO[at]SPAM gmail.com
8/31/2006 2:34:25 AM
dotnet compact framework:
Hi,

I can't seem to find any information on using the My.Resources object
in C# under CF2 in order to access localized resource strings. I know
it is no longer required to use the ResourceManager directly.

I was playing around with this functionality a while ago but can't
remember how I did it.

Any pointers would be great. All examples on MSDN seem to be VB which
works ok!?
Re: Strongly typed resource strings in CF2 Steve B.
8/31/2006 11:47:03 AM
Simply create a resource file in your project (.resx).
In the propery grid of the resource file, ensure the Custom tool is set to
"ResXFileCodeGenerator".
When you edit the resx file, a class will be generated (if the file is
myres.resx, the class will be myres).

If you want to support multiple langages, simply add beside the resx fil a
"culture".resx where culture is the name of the culture.
For example, create the following files :

myres.resx <-- neutral culture
myres.fr.resx <-- french culture
myres.de.resx <-- german culture

Note that the "ResXFileCodeGenerator" custom tool is only need to be set on
the neutral culture.

Hope that helps

Steve

<polly.dixon@gmail.com> a écrit dans le message de news:
1157016865.466543.269090@p79g2000cwp.googlegroups.com...
[quoted text, click to view]

AddThis Social Bookmark Button