|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.bluevibe.fire.util.Lang
The Lang class in an easy to use internationallization (i18n) implementation. The default language is English. Every key is the english version of the required text. If the key string maps to to a translation then the translation is returned. Othewise the key itself is returned. The class can load files with "key=value" pairs of strings on each line. The bundles can be loaded (using the FireIO class) either from a file inside the jar, or from a remote location or from a record in the midlets record store.
Field Summary | |
static java.lang.String |
defaultLang
|
Method Summary | |
static java.lang.String |
get(java.lang.String key)
Returns the string translation that maps to the key, or the key itself if the translation was not found. |
static java.lang.String |
getLang()
Returns a string indicating the current language. |
static void |
loadBundle()
Loads the stored bundle. |
static void |
setBundle(java.lang.String lang,
java.lang.String resource)
Sets a resource bundle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String defaultLang
Method Detail |
public static java.lang.String getLang()
public static void setBundle(java.lang.String lang, java.lang.String resource) throws java.lang.Exception
lang
- The string naming the language of the bundleresource
- The resource string.
java.lang.Exception
public static void loadBundle()
public static java.lang.String get(java.lang.String key)
key
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |