Localization in Visual Studio 2008

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

I have mastered the localization of forms for several languages, and I also have a project resource file for shared strings, but I cannot figure out how to create several language versions of this file!

It seems to be not documented anywhere.

The consequence of this is that if I want to create, say, a German version of my application, I need to edit the shared resource file (Properties / Resources.resx), create and deploy the application, and then re-edit the shared resource file in English.

Every time I want to create a new German version, I would have to do the same. This seems so awkward compared to form localization tools that I am sure there is a better way in VS2008. Does anyone know what it is?

+3
visual-studio-2008 localization
Dec 10 '08 at 10:59
source share
3 answers

You are right, I misunderstood the question.

In this case, you can try to add a new element to your project or add an existing copy of an existing resource file, just rename it first outside of VS.

Select "Resource File"

Name it Resource.de-DE.resx

After creating it, you can move it to the "Properties" folder.

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

Add your lines with German translations to the new resource file

Compile, and when the culture of the language or user interface stream changes, it must use the correct values ​​from the language resource file.

My quick little test worked fine and switched as desired.

+3
Dec 11 '08 at 3:54
source share

You can use the Satellite Resource DLL (note: I used them only in C ++).
This is a system in which you may have a different resource DLL for each language that you want to support. The application will no longer have resources (at least none of them may need to be localized), so the translation team will only need to translate the resource DLLs into the appropriate languages.

+2
Dec 10 '08 at 11:08
source share

In fact, Visual Studio has a built-in interface. In your form, you want to localize the Localizable to true property to change the language.

Then change the Language property to the language you want to configure the resource file in. In your case, select German.

Change the text in the form to German text. This will create an additional resx file for each language in which you also change the language property.

Once you are done, you can switch to another language for another translated form resource file or return to the default.

Now that the computer is running on a computer configured to use a different language, it will search for the resx file to match and switch all controls to use the text provided in the resource file.

You can also check this by changing CurrentUICulture to CurrentThread

Here's a nice walk on MSDN:
http://msdn.microsoft.com/en-us/library/y99d1cd3(VS.80).aspx

+1
Dec 10 '08 at 16:43
source share



All Articles