Adding Resources Outside of Visual Studio


Visual Studio makes localization quite easy. But it's rare that the developer of a major application would also be fluent in multiple target languages. And you certainly don't want non-programmers gaining access to your forms and code in Visual Studio, where they can do who-knows-what to its logic.

To keep foreign-language eyes and fingers where they belong, Microsoft wrote the Windows [Forms] Resource Localization Editor, and included it with the .NET Framework SDK. (On my system, it's found at Start [All] Programs Microsoft .NET Framework SDK v2.0 Tools Microsoft Resource Localization Editor. Its command-line name is winres.exe.) When you are ready to have a translator convert a form to a specific language, you need only to provide them with this program, and the form's .resx file (such as Form1.resx). The program simulates the display of the form as it appears in Visual Studio, and lets the translator modify any relevant form or control properties for a specific language. Figure 18-8 shows ForeignNames's Form1 in the Localization Editor.

Figure 18-8. An amazing likeness of Form1, ready for translation


The program prompts for the target language or language-culture when you try to save changes. It outputs a language-specific .resx file (like Form1.ja.resx for Japanese) that can be used in your application. Once you get the foreign resource files back from the translators, store them (the files, not the translators) in the project's source directory, and rebuild the project to generate the correct satellite assemblies.




Start-to-Finish Visual Basic 2005. Learn Visual Basic 2005 as You Design and Develop a Complete Application
Start-to-Finish Visual Basic 2005: Learn Visual Basic 2005 as You Design and Develop a Complete Application
ISBN: 0321398009
EAN: 2147483647
Year: 2006
Pages: 247
Authors: Tim Patrick

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net