translator
Class AnimalTranslator

java.lang.Object
  extended by translator.AnimalTranslator

public class AnimalTranslator
extends java.lang.Object


Constructor Summary
AnimalTranslator()
           
 
Method Summary
static void addResource(java.lang.String filename)
           
static TranslatableGUIElement getGUIBuilder()
           
static ExtendedResourceManagement getResourceBundle()
          Return the current ExtendedResourceBundle for translation purposes
static Translator getTranslator()
           
static void setTranslatorLocale(java.util.Locale targetLocale)
           
static java.lang.String translateMessage(java.lang.String messageKey)
          Convenience wrapper the translated message of key messageKey.
static java.lang.String translateMessage(java.lang.String messageKey, java.lang.Object o)
          Convenience wrapper the translated message of key messageKey.
static java.lang.String translateMessage(java.lang.String messageKey, java.lang.Object[] messageParams)
          Return the translated message of key messageKey using the message params Internally invokes generateMessage(messageKey, null);
static java.lang.String translateMessage(java.lang.String messageKey, java.lang.Object[] messageParams, boolean warnOnError)
          Return the translated message of key messageKey using the message params
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimalTranslator

public AnimalTranslator()
Method Detail

setTranslatorLocale

public static void setTranslatorLocale(java.util.Locale targetLocale)

getTranslator

public static Translator getTranslator()

getResourceBundle

public static ExtendedResourceManagement getResourceBundle()
Return the current ExtendedResourceBundle for translation purposes

Returns:
the current resource bundle

translateMessage

public static java.lang.String translateMessage(java.lang.String messageKey)
Convenience wrapper the translated message of key messageKey. Internally invokes generateMessage(messageKey, null);

Parameters:
messageKey - the key of the message to be displayed
Returns:
the translated String object
See Also:
translateMessage(String, Object[], boolean)

translateMessage

public static java.lang.String translateMessage(java.lang.String messageKey,
                                                java.lang.Object o)
Convenience wrapper the translated message of key messageKey. Internally invokes generateMessage(messageKey, null);

Parameters:
messageKey - the key of the message to be displayed
Returns:
the translated String object
See Also:
translateMessage(String, Object[], boolean)

translateMessage

public static java.lang.String translateMessage(java.lang.String messageKey,
                                                java.lang.Object[] messageParams)
Return the translated message of key messageKey using the message params Internally invokes generateMessage(messageKey, null);

Parameters:
messageKey - the key of the message to be displayed
messageParams - the values to be substituted into the message.
Returns:
the translated String object
See Also:
translateMessage(String, Object[], boolean)

translateMessage

public static java.lang.String translateMessage(java.lang.String messageKey,
                                                java.lang.Object[] messageParams,
                                                boolean warnOnError)
Return the translated message of key messageKey using the message params

Parameters:
messageKey - the key of the message to be displayed
messageParams - the values to be substituted into the message.
warnOnError - if true, log warnings due to invalid accesses or unavailable keys.
Returns:
the translated message as a String object

getGUIBuilder

public static TranslatableGUIElement getGUIBuilder()

addResource

public static void addResource(java.lang.String filename)
                        throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException