|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.opensync.engine.util.I18n
This class is used to internationalize the application
It use the ressource bundle opensync
| Field Summary | |
(package private) java.util.HashMap |
_locales
|
(package private) java.util.Locale |
fr_locale
|
(package private) java.util.ResourceBundle |
messages
|
(package private) java.util.Locale |
us_locale
|
| Constructor Summary | |
protected |
I18n()
Construct a I18n. |
| Method Summary | |
java.lang.String |
format(java.lang.String key,
java.lang.Object[] args)
Get the formatted message correponding to the key key |
java.lang.String |
get(java.lang.String key)
Get the message correponding to the key key |
static I18n |
getInstance()
Get the singleton instance of the I18n class |
protected static void |
setInstance()
Set the the singleton instance |
void |
setLocale(java.util.Locale locale)
|
void |
setLocale(java.lang.String langue_country)
Set the Localization |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.ResourceBundle messages
java.util.HashMap _locales
java.util.Locale fr_locale
java.util.Locale us_locale
| Constructor Detail |
protected I18n()
getInstance() instead
| Method Detail |
public static I18n getInstance()
I18n class
protected static void setInstance()
public java.lang.String get(java.lang.String key)
key
- Parameters:
key -
public java.lang.String format(java.lang.String key,
java.lang.Object[] args)
key
- Parameters:
key - the key of the messageargs - the paramters of the message
public void setLocale(java.lang.String langue_country)
throws java.util.MissingResourceException
langue_country - langue and country
java.util.MissingResourceException
public void setLocale(java.util.Locale locale)
throws java.util.MissingResourceException
java.util.MissingResourceException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||