|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.livotov.tpt.i18n.TM
public class TM
Translation manager - a front-end for toolkit-enabled application for getting locale-dependant strings for application messages. This static class should be used for both - translation queries and loading/changing dictionary files.
For more information please see the corresponding chapter in developer documentation.
Field Summary | |
---|---|
protected static java.util.HashMap<java.lang.String,Dictionary> |
translationDictionaries
Repository of dictionaries for all applications that are running. |
Constructor Summary | |
---|---|
TM()
|
Method Summary | |
---|---|
static java.lang.String |
get(com.vaadin.Application app,
java.lang.String key,
java.lang.Object... params)
Provides the translated string by the given key |
static java.lang.String |
get(java.lang.String key,
java.lang.Object... params)
Provides the translated string by the given key. |
static Dictionary |
getDictionary()
Provides the dictionary object, used for all instances of the current application. |
static Dictionary |
getDictionary(com.vaadin.Application app)
Provides the dictionary object, used for all instances of the specified application |
static void |
setDefaultLanguage(java.lang.String lang)
Proxy method for easy setting the default language for the current app dictionary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.HashMap<java.lang.String,Dictionary> translationDictionaries
Constructor Detail |
---|
public TM()
Method Detail |
---|
public static java.lang.String get(java.lang.String key, java.lang.Object... params)
key
- key to get string forparams
- - set of String.format parameters to parse
public static java.lang.String get(com.vaadin.Application app, java.lang.String key, java.lang.Object... params)
app
- application to look for the keys inkey
- key to get string forparams
- - set of String.format parameters to parse
public static void setDefaultLanguage(java.lang.String lang)
lang
- public static Dictionary getDictionary()
public static Dictionary getDictionary(com.vaadin.Application app)
app
- application
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |