org.argouml.i18n
Class Translator

java.lang.Object
  |
  +--org.argouml.i18n.Translator

public class Translator
extends java.lang.Object

A tool class to help localization.


Field Summary
protected static org.apache.log4j.Category cat
           
static java.lang.String MENU_BUNDLE
          Key for menu resource bundle.
 
Constructor Summary
Translator()
           
 
Method Summary
static java.lang.String getImageBinding(java.lang.String name)
          Provide a "gef compliant" image file name.
static void init()
          Default Locale is set and resources Bundles are loaded.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static org.apache.log4j.Category cat

MENU_BUNDLE

public static final java.lang.String MENU_BUNDLE
Key for menu resource bundle.
Constructor Detail

Translator

public Translator()
Method Detail

init

public static void init()
Default Locale is set and resources Bundles are loaded.

getImageBinding

public static java.lang.String getImageBinding(java.lang.String name)
Provide a "gef compliant" image file name.
Parameters:
name - the new i18n key
Returns:
the old i18n key

localize

public 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.
Parameters:
bundle - a binding to a bundle of i18n resources
key - the key to loacalize
Returns:
the translation


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook