Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.api
Class AuthorResourceBundleImpl

java.lang.Object
  extended by ro.sync.ecss.extensions.api.AuthorResourceBundleImpl
All Implemented Interfaces:
AuthorResourceBundle

public class AuthorResourceBundleImpl
extends java.lang.Object
implements 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. 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

AuthorResourceBundleImpl

public AuthorResourceBundleImpl(java.util.Properties properties)
Constructor.

Parameters:
properties - The properties containing the translations.
Method Detail

getMessage

public java.lang.String getMessage(java.lang.String key)
Description copied from interface: AuthorResourceBundle
Gets a message for the given key from this resource bundle.

Specified by:
getMessage in interface AuthorResourceBundle
Parameters:
key - The key for the desired string
Returns:
the string for the given key
See Also:
AuthorResourceBundle.getMessage(java.lang.String)

composeMessage

public java.lang.String composeMessage(java.lang.String descriptionWithEditorVariables)
Description copied from interface: AuthorResourceBundle
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.

Specified by:
composeMessage in interface AuthorResourceBundle
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
See Also:
AuthorResourceBundle.composeMessage(java.lang.String)

Oxygen XML Editor 14.2 Author API

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