|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.argouml.i18n.Translator
public final class Translator
The API class to the localization. All localization calls goes through this class.
| Method Summary | |
|---|---|
static void |
addClassLoader(java.lang.ClassLoader cl)
Add another class loader that the resource bundle could be located through. |
static java.util.Locale[] |
getLocales()
For Locale selection. |
static java.util.Locale |
getSystemDefaultLocale()
Returns the original value of the default locale for this instance of the Java Virtual Machine (which is independent from the selected configuration). |
static void |
init(java.lang.String locale)
Initialize the locale. |
static void |
initForEclipse(java.lang.String locale)
Alternate initialization entry point for use by ArgoEclipse. |
static java.lang.String |
localize(java.lang.String key)
The main function of this class that localizes strings. |
static java.lang.String |
localize(java.lang.String key,
java.lang.Object[] args)
Synonym for messageFormat to encourage developers to convert existing uses of localize() + string concatenation to use this method instead. |
static java.lang.String |
messageFormat(java.lang.String key,
java.lang.Object[] args)
Generates an localized String with arguments. |
static void |
setLocale(java.util.Locale locale)
Change the current Locale. |
static void |
setLocale(java.lang.String name)
Change the current Locale. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void initForEclipse(java.lang.String locale)
NOTE: This must be called *before* any other methods are called to work properly.
locale - the configured locale or "" or nullpublic static void init(java.lang.String locale)
locale - a string with the localepublic static java.util.Locale[] getLocales()
TODO: Detect the available locales from the available files.
public static void setLocale(java.lang.String name)
language [ "_" country ]
Only use this before the GUI is initialized.
name - the name of the new localepublic static void setLocale(java.util.Locale locale)
Only use this before the GUI is initialized.
locale - the new Localepublic static java.util.Locale getSystemDefaultLocale()
public static void addClassLoader(java.lang.ClassLoader cl)
cl - The ClassLoader to add.
public static java.lang.String localize(java.lang.String key,
java.lang.Object[] args)
The localized string is a pattern to be processed by
MessageFormat.
key - the key to localizeargs - the arguments as Objects to be inserted in string
messageFormat(String, Object[])public static java.lang.String localize(java.lang.String key)
key - The key to localize.
public static java.lang.String messageFormat(java.lang.String key,
java.lang.Object[] args)
The localized string is a pattern to be processed by
MessageFormat.
key - the key to localizeargs - the arguments as Objects, inserted in the localized String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |