IntelliJ Plugin Development Notes
  • Plugin Development Notes for JetBrains IDEs
  • Project Setup
    • Target a Specific IDE
  • OpenAPI
    • Actions
      • DumbAwareAction
    • Options
      • SettingsEditor
  • UI
    • Navigation
    • Tool Window
    • Icons
    • Project Wizard
    • Internationalization
    • Status Bar
    • Layout Managers
    • Text
    • Dialogs
    • Services Tool Window
  • Common Patterns
    • PSI Facade
    • Smart Mode and Dumb Mode
    • Lazy
  • Official Documentation
    • IntelliJ Platform SDK DevGuide
    • IntelliJ SDK Platform Documentation (GitHub)
    • Design Guidelines
    • Getting Started With IntelliJ
    • Creating IntelliJ Platform SDK Code Samples
  • Example Code
    • IntelliJ IDEA - Community Edition (Upsource)
    • IntelliJ IDEA Community Edition (GitHub)
    • Code Samples from SDK Docs
    • Open Source IntelliJ Plugins
    • Gradle Plugin Examples
    • IntelliJ Platform Plugin Template
  • Community
    • JetBrains Platform Slack
    • JetBrains Community Discord
    • Open API Community Support
  • Misc Links
    • FileDocumentManager Examples
  • Tools
    • Indices viewer
    • PsiViewer
    • UI Inspector
    • IntelliJ Platform Explorer
    • Plugin Validator
  • Tutorials
    • Publishing and Distributing a development build
    • Add New Module Type to the New Project Wizard
    • Auto-detect Executable File
  • Questions
    • Where are persistant state and settings files
Powered by GitBook
On this page
  • Message Bundle
  • Recommendations
  • Property Names
  • NLS Contexts
  • References

Was this helpful?

  1. UI

Internationalization

Notes on internationalizing plugins

PreviousProject WizardNextStatus Bar

Last updated 1 year ago

Was this helpful?

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

TODO message bundle tutorial

TODO create message bundle code template/intellij plugin

TODO AbstractBundle (Java default) vs DynamicBundle (Intellij helper class)

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)

TODO screenshots and examples of NLS contexts

References

https://docs.oracle.com/javase/tutorial/i18n/intro/quick.html
https://github.com/JetBrains/intellij-community/tree/master/platform/platform-api/src/com/intellij/com/intellij/openapi/util/NlsContexts.javagithub.com