|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectro.sync.ecss.extensions.api.AuthorResourceBundleImpl
public class AuthorResourceBundleImpl
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. Their names should be formatted like this: en_US.xml, fr_FR.xml, de_DE.xml, jp_JP.xml, it_IT.xml, nl_NL.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 one in the directory will be chosen. If no such file exists, the methods will return the same key which is given for translation.
Constructor Summary | |
---|---|
AuthorResourceBundleImpl(java.util.Properties properties)
Constructor. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthorResourceBundleImpl(java.util.Properties properties)
properties
- The properties containing the translations.Method Detail |
---|
public java.lang.String getMessage(java.lang.String key)
AuthorResourceBundle
getMessage
in interface AuthorResourceBundle
key
- The key for the desired string
AuthorResourceBundle.getMessage(java.lang.String)
public java.lang.String composeMessage(java.lang.String descriptionWithEditorVariables)
AuthorResourceBundle
composeMessage
in interface AuthorResourceBundle
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').
AuthorResourceBundle.composeMessage(java.lang.String)
|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |