|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.homeunix.thecave.moss.i18n.Translator
public class Translator
| Field Summary | |
|---|---|
protected java.util.Properties |
translations
|
| Constructor Summary | |
|---|---|
Translator(java.lang.String translationSuffix)
|
|
| Method Summary | |
|---|---|
java.lang.String |
get(java.lang.Enum<?> key)
Returns the translation, based on the given TranslateKey. |
java.lang.String |
get(java.lang.String key)
Returns the translation, based on the given string. |
java.util.List<java.lang.String> |
getLanguageList(java.lang.String translation)
Returns a list of languages to try to load, based on the given language. |
void |
loadLanguages(java.io.File languageDirectory,
java.util.List<java.lang.String> languages)
We try to load the languages specified in the list, in order of index. |
void |
loadLanguages(java.io.File jarFile,
java.lang.String resourcePath,
java.util.List<java.lang.String> languages)
We try to load the languages specified in the list, in order of index. |
void |
loadLanguages(java.lang.String resourcePath,
java.util.List<java.lang.String> languages)
We try to load the languages specified in the list, in order of index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.Properties translations
| Constructor Detail |
|---|
public Translator(java.lang.String translationSuffix)
| Method Detail |
|---|
public void loadLanguages(java.lang.String resourcePath,
java.util.List<java.lang.String> languages)
resourcePath - The path to the languages, inside of the current .jar file. Should be absolute (i.e., starting with a slash).languages - A list of languages to load, in order of index.translationSuffix - The suffix of the translation files, including the period if applicable.
public void loadLanguages(java.io.File jarFile,
java.lang.String resourcePath,
java.util.List<java.lang.String> languages)
jarFile - The jar file to load the translations from.resourcePath - The path to the languages, inside of the current .jar file. Should be absolute (i.e., starting with a slash).languages - A list of languages to load, in order of index.translationSuffix - The suffix of the translation files, including the period if applicable.
public void loadLanguages(java.io.File languageDirectory,
java.util.List<java.lang.String> languages)
languageDirectory - The path to the languages, on the current file system.languages - A list of languages to load, in order of index.translationSuffix - The suffix of the translation files, including the period if applicable.public java.util.List<java.lang.String> getLanguageList(java.lang.String translation)
translation - The localized language
public java.lang.String get(java.lang.String key)
key - The key to translate
public java.lang.String get(java.lang.Enum<?> key)
key - The key to translate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||