com.azalient.api.i18n
Class EnumTranslator

java.lang.Object
  extended by com.azalient.api.i18n.EnumTranslator

public class EnumTranslator
extends Object

This class is used to retrieve labels from enumerations and include them in the list of words and phrases that are translated.

Typically, this class is used by adding a toString() method to the enumeration like this:

   public String toString(){ return EnumTranslator.translate(name());  
   
For this to work, the enumeration must be registered in this class


Constructor Summary
EnumTranslator()
           
 
Method Summary
static ITranslator enumTranslator()
           
static void enumTranslator(ITranslator t, boolean reg)
           
static boolean isEnum(String e)
           
static String translate(String english)
          If you call this, you must also register the enum in the EnumTranslator class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumTranslator

public EnumTranslator()
Method Detail

translate

public static String translate(String english)
If you call this, you must also register the enum in the EnumTranslator class


enumTranslator

public static ITranslator enumTranslator()

enumTranslator

public static void enumTranslator(ITranslator t,
                                  boolean reg)

isEnum

public static boolean isEnum(String e)