|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object | +--org.argouml.i18n.Translator
A tool class to help localization.
| Field Summary | |
|---|---|
private static Logger |
cat
logger |
private static java.util.Properties |
images
Binding between new key names and old ones needed by gef. |
private static java.lang.String |
propertiesFile
Property file containing the bindings. |
| Constructor Summary | |
|---|---|
Translator()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getImageBinding(java.lang.String name)
Provide a "gef compliant" image file name. |
static java.util.Locale[] |
getLocales()
For Locale selection. |
static void |
init()
Default Locale is set and resources Bundles are loaded. |
private static java.util.Properties |
loadImageBindings(java.lang.String file)
Loads image bindings from a File. |
static java.lang.String |
localize(java.lang.String key)
Helper for those that don't want to give the bundle. |
static java.lang.String |
localize(java.lang.String bundle,
java.lang.String key)
Helper for localization to eliminate the need to import the gef util library. |
static java.lang.String |
messageFormat(java.lang.String bundle,
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static Logger cat
private static java.util.Properties images
private static java.lang.String propertiesFile
| Constructor Detail |
public Translator()
| Method Detail |
public static void init()
public static java.util.Locale[] getLocales()
public static void setLocale(java.util.Locale locale)
locale - the new Localeprivate static java.util.Properties loadImageBindings(java.lang.String file)
file - the properties file
public static java.lang.String getImageBinding(java.lang.String name)
name - the new i18n key
public static java.lang.String localize(java.lang.String bundle,
java.lang.String key)
bundle - a binding to a bundle of i18n resourceskey - the key to loacalize
public static java.lang.String localize(java.lang.String key)
key - to localize
public static java.lang.String messageFormat(java.lang.String bundle,
java.lang.String key,
java.lang.Object[] args)
bundle - a binding to a bundle of i18n resourceskey - the key to localizeargs - the args 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-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |