org.eclipse.net4j.util.om
Interface OMBundle.TranslationSupport

Enclosing interface:
OMBundle

public static interface OMBundle.TranslationSupport

A facility for accessing resource bundles.


Method Summary
 String getString(String key)
          Returns the string resource associated with the key.
 String getString(String key, boolean translate)
          Returns the string resource associated with the key.
 String getString(String key, boolean translate, Object... args)
          Returns a string resource associated with the key, and performs substitutions.
 String getString(String key, Object... args)
          Returns a string resource associated with the key, and performs substitutions.
 void setShouldTranslate(boolean shouldTranslate)
          Sets whether strings should be translated by default.
 boolean shouldTranslate()
          Indicates whether strings should be translated by default.
 

Method Detail

shouldTranslate

boolean shouldTranslate()
Indicates whether strings should be translated by default.

Returns:
true if strings should be translated by default; false otherwise.

setShouldTranslate

void setShouldTranslate(boolean shouldTranslate)
Sets whether strings should be translated by default.

Parameters:
shouldTranslate - whether strings should be translated by default.

getString

String getString(String key)
Returns the string resource associated with the key.

Parameters:
key - the key of the string resource.
Returns:
the string resource associated with the key.

getString

String getString(String key,
                 boolean translate)
Returns the string resource associated with the key.

Parameters:
key - the key of the string resource.
translate - whether the result is to be translated to the current locale.
Returns:
the string resource associated with the key.

getString

String getString(String key,
                 Object... args)
Returns a string resource associated with the key, and performs substitutions.

Parameters:
key - the key of the string.
args - the message substitutions.
Returns:
a string resource associated with the key.
See Also:
getString(String), MessageFormat.format(String, Object...)

getString

String getString(String key,
                 boolean translate,
                 Object... args)
Returns a string resource associated with the key, and performs substitutions.

Parameters:
key - the key of the string.
translate - whether the result is to be translated to the current locale.
args - the message substitutions.
Returns:
a string resource associated with the key.
See Also:
getString(String), MessageFormat.format(String, Object[])


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.