wiki:i18n

Internationalisation (i18n)

It will come with release 0.3.

There is a good guide on internationalisation and externalizing string at  How to Internationalize your Eclipse Plug-In.

When doing the translation for a language, please add in any case the messages_{language}.properties file of the language to the resource folder, even if it's empty (meaning all translations are taken from the messages.properties file). This will show to other developers, that you've thought about translation but no one was needed.

Notes:

  • The properties files are located in the src/main/java/ folder (not following maven's philosophy) to be able to use Eclipse 'Externalize Strings' wizard also later on. When following maven philosophy (*.properties in src/main/resources), the wizard doesn't finds the properties files.
  • For replacing placeholders, we use Eclipse' NLS.bind function, e.g.
    From messages.properties:
     EditAliasesDialog.TheAliasBegin=The alias "{0}" is invalid.
    
    will in Java code look like
     NLS.bind( Messages.getString( "EditAliasesDialog.TheAliasBegin" ), new String[] { alias } ) );
    

Hints:

  • Using Eclipse' Property-Editor in the 'Properties' view will prevent you from comming into troubles with uncomment characters like e.g. the German 'Umlauts'