|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.browsecode.helpers.Translator
public class Translator
Support for multiple bundles of language translation files -- thus, we can use files from several sources. Vaguely based on Ekit's Translatrix.
Constructor Summary | |
---|---|
Translator()
|
Method Summary | |
---|---|
void |
addBundle(java.util.ResourceBundle bundle)
|
void |
addBundle(java.lang.String bundleName,
java.util.Locale locale)
|
void |
automaticallyAddSomeBundles()
Automatically load as many bundles as possible -- for now, from the SurveyEditor and from Ekit. |
static Translator |
defaultTranslator()
This intentionally breaks the "get" rule where the method should start with get. |
static java.lang.String |
getTranslated(java.lang.String keyTextString)
Same as getTranslatedString, but static. |
java.lang.String |
getTranslatedString(java.lang.String originalText)
|
static boolean |
hasDefaultTranslator()
|
void |
setAsDefaultTranslator()
Set this instance as the default translator instance, so that anyone using this class statically will get this instance instead of another one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Translator()
Method Detail |
---|
public void setAsDefaultTranslator()
public void automaticallyAddSomeBundles()
public void addBundle(java.lang.String bundleName, java.util.Locale locale)
public void addBundle(java.util.ResourceBundle bundle)
public static java.lang.String getTranslated(java.lang.String keyTextString)
originalText
-
public static boolean hasDefaultTranslator()
public static Translator defaultTranslator()
public java.lang.String getTranslatedString(java.lang.String originalText)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |