Alvaro Cavalcanti
Alvaro Cavalcanti

Reputation: 3078

How to translate (internationalize) a third-party Eclipse Plug-In?

I'm developing a RCP Eclipse-based application and it makes use of the Eclipse providing tool, p2, as of Eclipse 3.4 (Ganymede).

The thing is, this application must be fully in Brazillian Portuguese, and it already is, except for the p2-related UI. And that's what I need to translate. How can I?

This is where I've been:

  1. Added the "updateMenu.label", "actionSets.softwareUpdates.label"... labels to my plugin.properties. Didn't work. I found out that this was related to the previous providing mechanism (Update Manager).
  2. Found the "message.properties" file inside the "org.eclipse.equinox.internal.p2.ui.sdk" package. Then created a copy of it on the root of my plugin folder, left only two keys and translated them. Didn't work. I guess either this is not possible or the new file should be placed under another folder?

So, I ask, is this even possible?

I still have two options in mind:

  1. Create a package with the same name of the p2 one inside my plugin and place the properties there
  2. Add a sufix to the file and change the locale of the application (it hasn't been done anywhere on the code since all the other messages are in Portuguese and it's a single-language application

Any suggestions?

All the best
-Alvaro C.

Upvotes: 1

Views: 623

Answers (2)

Udo Jung
Udo Jung

Reputation: 1

Just do the translations in Eclipse with correct fragment and package name and export the translation fragment with your product, e.g. by including it into an exported feature if product depends on features.

Upvotes: 0

Isa Hekmat
Isa Hekmat

Reputation: 758

you should just add a fragment project to enhance the functionality(here the language) of your third party plug-in.

1.create a fragment project

2.set your third party plug-in as "host plug-in"

3.create your message property in this fragment

EDIT: See http://www.eclipse.org/babel/ for a set of existing translations and for examples of using fragments to translate .properties files.

Upvotes: 2

Related Questions