How to get localized project resources in VB.Net 2005

B

Bob

I had developped a class in Vs2003 Vb.net that would give me localized
project ressources (not form ressources, these were in the individual
forms).
I had two files MyProjectResources.resx and MyProjectResources.fr.resx, they
were in the project folder topgether with all the forms and other files. The
clas that worked fine in Vs2003 no longer works in Vs2003. It gives me a
nothing value whenever I try to get a ressource string from the above
resource files and I know that the values passed to the class and used by it
are correct, it just won't work. I noticed that in My project there is a
file resource.resx and an associated designer. So I figure that if I want to
localize the project in 2005 for french I need to add a file
resource.fr.resx to the My project folder but I seem to be unable to do so.
I guess that if that worked I could the MY.resources and I would be getting
the correctly localized string back to put in message boxes and the like. Am
I right? If so how do I do this in Vs2005?

Thanks for any help

Bob
 
H

Herfried K. Wagner [MVP]

Bob said:
So I figure that if I want to localize the project in 2005 for french
I need to add a file resource.fr.resx to the My project
folder but I seem to be unable to do so. I guess that if that worked I
could the MY.resources and I would be getting the correctly localized
string back to put in message boxes and the like. Am I right? If so how do
I do this in Vs2005?

Yes, this should work. Simply add additional resource files and name them
"resources.fr.resx", and 'My.Resources' will return the string depending on
the thread's current culture.
 

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