|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.i18n.Language
public class Language
This class is used by the i18n class. It encapsulates the translation resource for a given language.
Encoding to be used to read properties files will be ISO-8859-1 since java does it like this.
| Field Summary | |
|---|---|
protected Locale |
locale
la locale de la langue |
protected Properties |
resource
toutes les traductions pour cette langue |
| Constructor Summary | |
|---|---|
Language(Locale l)
|
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
equals(Object o)
|
protected void |
finalize()
|
static URLClassLoader |
getLoader()
|
Locale |
getLocale()
|
int |
hashCode()
|
void |
load(org.nuiton.i18n.bundle.I18nBundleEntry[] bundleEntries)
charge les traductions de la languea partir d'une liste donnee de fichiers de traduction. |
int |
size()
|
String |
toString()
|
String |
translate(String sentence)
translate takes a sentence and returns its translation if found, the very same string otherwise. |
String |
untranslate(String sentence)
untranslate takes a translated sentence and returns the original one if found, the very same string otherwise. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Properties resource
protected Locale locale
| Constructor Detail |
|---|
public Language(Locale l)
l - the current locale of the language| Method Detail |
|---|
public static URLClassLoader getLoader()
public void load(org.nuiton.i18n.bundle.I18nBundleEntry[] bundleEntries)
bundleEntries - the used bundles entries to loadpublic String translate(String sentence)
sentence - sentence to translate
public String untranslate(String sentence)
sentence - sentence to untranslate
public Locale getLocale()
public int size()
public void close()
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||