Menu

#45 Support of multiple languages

1.0
closed
RFE (45)
2015-10-18
2015-10-02
No

The text messages are currently in English both in the game and in the editor. It's possible to support several languages by using i18n. One property file per language can be created (for example MessagesBundle.properties by default, MessagesBundle_fr.properties for French, ...), their keys can be used in the source code instead of hardcoding the strings. ResourceBundle.getBundle(String baseName) can be used to retrieve the bundle and ResourceBundle.getString(String key) can be used to retrieve the localized text. N.B: The base name is a package name.

The default locale can be used. Maybe it would be useful to allow the end user to choose another locale.

Discussion

  • Julien Gouesse

    Julien Gouesse - 2015-10-04
    • status: open --> accepted
     
  • Julien Gouesse

    Julien Gouesse - 2015-10-04

    The commit 1086 implements the very first part of the internationalization. Lots of translations are still missing.

     
  • Julien Gouesse

    Julien Gouesse - 2015-10-18

    The commit 1090 adds several files to support some languages including Spanish, Portuguese, Italian, Swedish and Dutch:
    http://sourceforge.net/p/tuer/code/1090/

    The commits 1091 and 1095 improve the translated messages. The commits 1092 and 1093 move the mechanism into a separate class and allow to use a language different of the default language (i.e the language of the operating system) by using the configuration file. The language code (ISO 639 alpha-2 or alpha-3 language code) is used to designate a language. It's not yet possible to modify the language in the graphical user interface.

     
  • Julien Gouesse

    Julien Gouesse - 2015-10-18

    The commit 1098 ensures that a font supporting the accentuated characters is used with the translatable messages. The commit 1099 adds a sub-menu into the main menu to allow the end user to modify the language without editing the configuration file.

     
  • Julien Gouesse

    Julien Gouesse - 2015-10-18

    I'm not sure that I will translate the messages of the editor as the graphical user interface will change a lot in the next years. I should rather do it when the editor really works and it has a really well defined workflow. Moreover, the editor doesn't target the same audience than the game, there is no urgent need to translate it.

     
  • Julien Gouesse

    Julien Gouesse - 2015-10-18
    • status: accepted --> closed
     

Log in to post a comment.