Use translation in own framework

Oxygen general issues.
patrick
Posts: 96
Joined: Mon May 09, 2011 11:54 am

Use translation in own framework

Post by patrick »

Can you help me using the translation file in my own java framwork extension? I have my current framework with english strings for window titles and buttons and a translation.xml which includes the english and german translations. Where can I find information how to put them together?

Is it also possible to translate the name of the xslt-scripts which I have added to my framework?

Thanks,
Patrick
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use translation in own framework

Post by Radu »

Hi Patrick,

This topic should be a starting point:

http://www.oxygenxml.com/doc/ug-oxygen/ ... works.html

Basically your translation.xml should look like this one:

OXYGEN_INSTALL_DIR/frameworks/docbook/i18n/translation.xml

then if you edit the Docbook 4 document type, in the Classpath tab there is an entry ${framework}/i18n/.

You can then use the keys defined in the translation.xml in two ways:

1) If you have custom Java code (extensions) which wants to use the translations by using the API:

Code: Select all

ro.sync.ecss.extensions.api.AuthorAccess.getAuthorResourceBundle()
2) When defining actions you can also use those keys for the action name, description using a special editor variable, you can see how the Docbook 4 actions are defined.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply