|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.i18n.I18nLanguage
public class I18nLanguage
Represents a language in i18n system with all his translations.
To obtain a translation, use the methodtranslate(String)
| Field Summary | |
|---|---|
protected Locale |
locale
la locale de la langue |
protected String |
recordFilePath
Indique le chemin du fichier dans lequel ecrire les entrees non trouvees |
protected Properties |
resource
toutes les traductions pour cette langue |
| Constructor Summary | |
|---|---|
I18nLanguage(Locale l)
|
|
I18nLanguage(Locale locale,
String recordFilePath)
|
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
equals(Object o)
|
protected void |
finalize()
|
Locale |
getLocale()
|
int |
hashCode()
|
void |
load(I18nBundleEntry[] bundleEntries)
Deprecated. since 2.4 use load(I18nBundleEntry[], Charset) instead,
charset must be provided to avoid encoding problems |
void |
load(I18nBundleEntry[] bundleEntries,
Charset encoding)
charge les traductions de la languea partir d'une liste donnee de fichiers de traduction. |
protected void |
recordNotFound(String key)
|
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 final Locale locale
protected String recordFilePath
| Constructor Detail |
|---|
public I18nLanguage(Locale l)
public I18nLanguage(Locale locale,
String recordFilePath)
| Method Detail |
|---|
@Deprecated public void load(I18nBundleEntry[] bundleEntries)
load(I18nBundleEntry[], Charset) instead,
charset must be provided to avoid encoding problems
bundleEntries - the used bundles entries to load
public void load(I18nBundleEntry[] bundleEntries,
Charset encoding)
bundleEntries - the used bundles entries to loadencoding - Charset to use for Properties loadingpublic String translate(String sentence)
sentence - sentence to translate
protected void recordNotFound(String key)
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 | |||||||||