Localization in Visual Studio 2008

廉价感情. 提交于 2019-12-03 01:53:42

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.

KMessenger

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!