Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localization in Visual Studio 2008

I am trying to localize a desktop app (C#) in VS2008.

I have mastered localizing the forms for multiple languages and I also have a project resource file for general strings but I cannot fathom out how to create multiple language versions of this file!

It doesn't seem to be documented anywhere.

The consequence seems to be that if I want to produce, say, a German version of my application I have to edit the general resource file (Properties/Resources.resx), build and deploy the application, then re-edit the general resource file back to English.

Every time I want to produce a new German version I would have to do the same. This seems so clunky compared to the tools for localising forms that I am sure there is a better way in VS2008. Does anyone know what it is?

like image 769
user44941 Avatar asked Dec 13 '25 22:12

user44941


1 Answers

You're right, I misread the question.

In that case what you might want to try is add a new Item to the your project, or you add an existing copy of your existing resource file just might have to rename it first outside VS.

Choose "Resources file"

Name it Resource.de-DE.resx

Once it it created you can move it the Properties folder.

Open the file, change the access modifier at the top to internal, it will be set to "No code generation"

Add your strings with the German translations to the new resource file

Compile and when the language or thread UI culture changes it should use the correct values from the language resource file.

My quick little test worked fine and switched as desired.

like image 195
KMessenger Avatar answered Dec 15 '25 18:12

KMessenger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!