|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.util.manager.Value
qx.locale.Manager
public class Manager
Create a new instance of qx.locale.Manager
Constructor Summary | |
---|---|
Manager()
|
Method Summary | |
---|---|
void |
_applyLocale(java.lang.Object value,
java.lang.Object old)
|
String |
_extractLanguage(String locale)
Extract the language part from a locale. |
void |
addTranslation(String languageCode,
java.lang.Object translationMap)
Add a translation to the translation manager |
void |
addTranslationFromClass(String classname,
java.lang.Object translationMap)
Extract language code from class name and add a translation to the translation manager |
String |
getAvailableLocales()
Return the available application locales |
String |
getLanguage()
Get the language code of the currnt locale |
String |
getLocale()
Returns the (computed) value of the property locale . |
String |
getTerritory()
Get the territory code of the currnt locale |
void |
initLocale(String arg)
Calls the apply method and dispatches the change event of the property locale
with the default value defined by the class developer. |
void |
resetLocale()
Resets the user value of the property locale . |
void |
setLocale(String arg)
Sets the user value of the property locale . |
String |
translate(String messageId,
java.lang.Object args,
String locale)
Translate a message using the current locale and apply format string to the arguments. |
Methods inherited from class qx.util.manager.Value |
---|
_updateObjects, connect, disconnect, isDynamic, resolveDynamic |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Manager()
Method Detail |
---|
public void _applyLocale(java.lang.Object value, java.lang.Object old)
public String _extractLanguage(String locale)
Extract the language part from a locale.
public void addTranslation(String languageCode, java.lang.Object translationMap)
Add a translation to the translation manager
public void addTranslationFromClass(String classname, java.lang.Object translationMap)
Extract language code from class name and add a translation to the translation manager
public String getAvailableLocales()
Return the available application locales
This corresponds to the Makefile APPLICATION_LOCALES setting
public String getLanguage()
Get the language code of the currnt locale
This is the first part of a locale definition. The language for “de_DE” would be “de”
public String getLocale()
Returns the (computed) value of the property locale
.
For further details take a look at the property definition: locale
.
public String getTerritory()
Get the territory code of the currnt locale
This is the second part of a locale definition. The territory for “de_DE” would be “DE”
public void initLocale(String arg)
Calls the apply method and dispatches the change event of the property locale
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: locale
.
public void resetLocale()
Resets the user value of the property locale
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: locale
.
public void setLocale(String arg)
Sets the user value of the property locale
.
For further details take a look at the property definition: locale
.
public String translate(String messageId, java.lang.Object args, String locale)
Translate a message using the current locale and apply format string to the arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |