Page 1 of 1
Use translation in own framework
Posted: Wed Jul 25, 2012 3:33 pm
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
Re: Use translation in own framework
Posted: Wed Jul 25, 2012 4:11 pm
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