Search code examples
javapluginseclipse-rcplanguage-packs

Java: Multiple language packs with different versions, What will happen?


I'm wondering what will happen if I'm using two or more different language packs (different versions) for a plugin. Which one will be used?

Example

Plugin: org.eclipse.core.jobs.nl_ru_3.7.0.v20131123061707.jar

What happens if in about a year I add a new version of this language plugin to my application. (Both are inside the plugin directory) ?

Should I delete the previous version or doesn't it matter at all and if it doesn't matter, why?


Solution

  • Plugins, which contain localization are still old good OSGI plugins and thus same rules are applied (thus, for i18n it is recommended to use fragments).

    In each plugin, which depends on your localization plugin you may define range of versions or exact version, which should be used.

    1. In case you have an exact match. Then only plugin, that matches the version will be used.
    2. In case you have a range, then latest version will be used.
    3. In case no version is defined, then latest version will be used.

    To sum up: if one plugin needs to use specific localization plugin, you need to set appropriate dependency version.

    More on Internationalization.