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?
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.
You can use Satellite Resource DLLs (note: I've only used them in C++).
This is a system where you can have a different resource DLL for each language that you want to support. There will be no more resources inside the application (at least none that might have to be localized), so the translation team will only have to make translations of the resource DLL into the appropriate languages.
Actually Visual Studio has this built in. On your form you wish to localize for a language change the property Localizable to true.
Then change the Language property to the language you wish to set up a resource file for. In your case, choose German.
Change all the text on the form to the German text. This will create an additional resx file for each language you change the Language Property too.
Once you finish you can change to another language for another translated form resource file or switch back to default.
Now when the computer is run on a machine set up to use a different language it will look for a resx file to match and switch all the controls to use the text provided in the resource file.
You can also test this by changing the CurrentUICulture on the CurrentThread
Here is a nice walk-through on MSDN as well:
http://msdn.microsoft.com/en-us/library/y99d1cd3(VS.80).aspx