Proper localization of a WinForms application

前端 未结 5 659
Happy的楠姐
Happy的楠姐 2020-11-30 01:11

I have a WinForms application which I want to translate into multiple languages. However, I do not have any experience with localizing a WinForms a

5条回答
  •  不知归路
    2020-11-30 01:36

    What you are asking for:

    1. no satellite resource files
    2. only one size and control placement per form.
    3. lots of languages embedded in the executable.

    Is not do-able in vanilla Visual Studio's IDE.

    What it would require is some custom work, basically fulfilling all these steps:

    • Acquire a custom resource manager that handles TMX resource files.
    • Put all your localizable strings in a TMX file.
      • Make this TMX file an embedded resource in your project.
    • In your Form constructor, create your TMX ResourceManager, loading the TMX file from your embedded resources.
    • In your code, use your tmx ResourceManager instead of the default ResourceManager for getting localized strings.
      • Let the Form use the default ResourceManager for getting all the designer things except the strings.
    • Get your TMX file fleshed out with the new language translations.
      • More can be added in the next release of your project, just by adding them to this TMX file before you compile.

    RESOURCES: (not an exhaustive list, by any means)

    • http://en.wikipedia.org/wiki/Translation_Memory_eXchange
    • http://sourceforge.net/projects/tmx-editor/

提交回复
热议问题