Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.api
Interface AuthorResourceBundle

All Known Implementing Classes:
AuthorResourceBundleImpl

@API(type=NOT_EXTENDABLE,
     src=PUBLIC)
public interface AuthorResourceBundle

Gives access to translate keys a certain each framework to a target language. The translation files should all be located in a separate directory (usually named "i18n") in the specific framework's directory. This particular "i18n" directory should be explicitly added to the document type's class path list in the Document Type Edit dialog. Their names should be formatted like this: translation*.xml Only one translation file will be used to translate the keys to values. How is this translation file detected? The first file which matches the same GUI language that Oxygen uses in the Preferences will be used. If no such file exists, the first encountered translation will be used. If no such file exists, the methods will return the same key which is given for translation.

Since:
14

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.


Method Summary
 java.lang.String composeMessage(java.lang.String descriptionWithEditorVariables)
          Compose a message for the given description which may contain more than one keys referenced using editor variables.
 java.lang.String getMessage(java.lang.String key)
          Gets a message for the given key from this resource bundle.
 

Method Detail

getMessage

java.lang.String getMessage(java.lang.String key)
Gets a message for the given key from this resource bundle.

Parameters:
key - The key for the desired string
Returns:
the string for the given key
Throws:
java.lang.NullPointerException - if key is null

composeMessage

java.lang.String composeMessage(java.lang.String descriptionWithEditorVariables)
Compose a message for the given description which may contain more than one keys referenced using editor variables. The key contains "${i18n(key)}" editor variables which will be expanded.

Parameters:
descriptionWithEditorVariables - the key for the desired string. Example: The description: '${i18n(key1)} and ${i18n(key2)}' will be composed to: 'value1 and value2' where 'value1' is obtained by calling getMessage('key1').
Returns:
the string for the given key
Throws:
java.lang.NullPointerException - if descriptionWithEditorVariables is null

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.