org.tridas.io.gui
Class I18n

java.lang.Object
  extended by org.tridas.io.gui.I18n

public class I18n
extends Object

Simple localization

Author:
Daniel

Method Summary
static Boolean getBoolean(String argKey)
          Gets the boolean value of the key.
static Integer getInteger(String argKey)
          Gets and integer value of the key.
static String getText(String key)
          Get the text for this key.
static String getText(String argKey, String... argReplacing)
          Look up a translation key with each {n} replaced with a value in the array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getText

public static String getText(String key)
Get the text for this key. The text has no special control characters in it, and can be presented to the user.

For example, if the localization file has the line copy = &Copy [accel C], the string "Copy" is returned.

Parameters:
key - the key to look up in the localization file
Returns:
the text

getText

public static String getText(String argKey,
                             String... argReplacing)
Look up a translation key with each {n} replaced with a value in the array

Parameters:
argKey -
argReplacing -
Returns:

getInteger

public static Integer getInteger(String argKey)
Gets and integer value of the key. If the value isn't able to parse as an integer, null is returned

Parameters:
argKey -
Returns:

getBoolean

public static Boolean getBoolean(String argKey)
Gets the boolean value of the key. If the value is anything but "true", then false is returned

Parameters:
argKey -
Returns:


Copyright © 2011. All Rights Reserved.