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.


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.
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 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
 

Constructor Detail

Translator

public Translator()
Method Detail

init

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


getLocales

public static java.util.Locale[] getLocales()
For Locale selection.

Returns:
Locales used in ArgoUML

setLocale

public static void setLocale(java.util.Locale locale)
Change the current Locale.

Parameters:
locale - the new Locale

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 © 1996-2003 (20040216)ArgoUML Project HomeArgoUML Cookbook