Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to plug a different i18n mechanism
How to plug a different i18n mechanism [message #530095] Wed, 28 April 2010 13:19 Go to next message
Damien is currently offline DamienFriend
Messages: 3
Registered: July 2009
Junior Member
We want to change the default internationnalization mechanism used by eclipse, is it possible to do that?

The reason because we want to do this is that all our externalized messages, labels, ... are stored in a database and we want keep this mechanism for plugin.xml strings that need to be translated in different languages.

Thank you in advance for your help.

Re: How to plug a different i18n mechanism [message #530108 is a reply to message #530095] Wed, 28 April 2010 13:47 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
The extension registry makes use of the OSGi Manifest localization built into the framework. The Equinox framework publishes a org.eclipse.osgi.service.localization.BundleLocalization service so the eclipse extension registry can obtain ResourceBundle objects for a bundle to get translated strings for plugin.xml files.

You could try registering your own org.eclipse.osgi.service.localization.BundleLocalization OSGi service object at a high service ranking so that the extension registry used your version over the one provided by the framework. This may allow you to replace the mechanism used by the Extension registry (for plugin.xml files) but it will not replace the mechanism used by the Equinox OSGi framework for translating entries in /META-INF/MANIFEST.MF files.

HTH

Tom.
Re: How to plug a different i18n mechanism [message #780173 is a reply to message #530095] Tue, 17 January 2012 09:55 Go to previous messageGo to next message
Bartosz  C is currently offline Bartosz CFriend
Messages: 2
Registered: January 2012
Junior Member
Any word on this?

I have tried to override the default BundleLocalization service, but it didn't work due to the default BundleLocalization service is being registered with the Constants.SERVICE_RANKING property of value Integer.MAX_VALUE.

Regards,
Bart
Re: How to plug a different i18n mechanism [message #780533 is a reply to message #780173] Wed, 18 January 2012 13:42 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Hi Bart,

You are correct. I did not realize the service ranking was set to max by the framework for the BundleLocalization service registration. My previous comment will not work. Currently there is no way to override this behavior.

Tom.
Previous Topic:Being notified when a bundle throws an exception - OSGi - Helios
Next Topic:How to prevent bundle resume on restart
Goto Forum:
  


Current Time: Thu Apr 25 20:46:44 GMT 2024

Powered by FUDForum. Page generated in 0.02950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top