Internationalization

Notes on internationalizing plugins

This is a work in progress, but will document how to implement internationalization a plugin and provide recommendations on what needs to be internationalized.

Message Bundle

The backbone of Java translations are a MessageBundle class. This is used to fetch strings in your plugin. Code for each of these is pretty much copy/paste across plugins. Translations are stored in properties file

Recommendations

In addition to the recommendations found here, documentation on specific ui elements and tutorials will have a section dedicated to internationalization. This will hopefully encourage new plugins being internationalized by default.

Might also lookup some annotations like @NLS and @NONNLS and provide some guidance on those and others if found

Property Names

I was going to say something here about modeling property names after the plugin.xml hierarchy and things like using action ids as part of the messages.property names, but I'm still working on going through different plugins and finding out if there's an actual intuitive convention

NLS Contexts

NLS Contexts provide annotations to enforce some wording and grammar style guides (FIXME not sure if this is exactly right, but it's how I understand it)

References

https://docs.oracle.com/javase/tutorial/i18n/intro/quick.html

Last updated

Was this helpful?