|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.argouml.i18n.Translator
The API class to the localization. All localization calls goes through this class.
| Field Summary | |
private static Properties |
images
Binding between new key names and old ones needed by gef. |
private static Logger |
LOG
logger |
private static String |
propertiesFile
Property file containing the bindings. |
| Constructor Summary | |
Translator()
|
|
| Method Summary | |
static String |
getImageBinding(String name)
Provide a "gef compliant" image file name. |
static Locale[] |
getLocales()
For Locale selection. |
static void |
init()
Default Locale is set and resources Bundles are loaded. |
private static Properties |
loadImageBindings(String file)
Loads image bindings from a File. |
static String |
localize(String key)
Helper for those that don't want to give the bundle. |
static String |
localize(String bundle,
String key)
Deprecated. by Linus Tolke as of 0.17.2. Use localize(String key). |
static String |
messageFormat(String key,
Object[] args)
Generates an localized String with arguments. |
static String |
messageFormat(String bundle,
String key,
Object[] args)
Deprecated. by Linus Tolke as of 0.17.2. Use messageFormat(String key, Object[] args). |
static void |
setLocale(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 final Logger LOG
private static Properties images
private static String propertiesFile
| Constructor Detail |
public Translator()
| Method Detail |
public static void init()
public static Locale[] getLocales()
public static void setLocale(Locale locale)
locale - the new Localeprivate static Properties loadImageBindings(String file)
file - the properties file
public static String getImageBinding(String name)
name - the new i18n key
public static String localize(String bundle,
String key)
localize(String key).
This is only used when retrieving the strings localized in GEF.
bundle - a binding to a bundle of i18n resourceskey - the key to loacalize
public static String localize(String key)
Note: This one argument key
doesn't seem to work for tags that aren't prefixed with the
property file name. We get a NullPointerException.
key - The key to localize.
public static String messageFormat(String bundle,
String key,
Object[] args)
messageFormat(String key, Object[] args).
The localized string is a pattern to be processed by
MessageFormat.
bundle - a binding to a bundle of i18n resourceskey - the key to localizeargs - the args as Objects, inserted in the localized String
public static String messageFormat(String key,
Object[] args)
The localized string is a pattern to be processed by
MessageFormat.
key - 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 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |