org.objectweb.cjdbc.common.i18n
Class I18N

java.lang.Object
  extended byorg.objectweb.cjdbc.common.i18n.I18N
Direct Known Subclasses:
ConsoleTranslate, GuiTranslate, JmxTranslate, MonitorTranslate, Translate, WizardTranslate

public abstract class I18N
extends java.lang.Object

This class defines a I18N

Version:
1.0
Author:
Nicolas Modrzyk

Constructor Summary
I18N()
           
 
Method Summary
static java.lang.String get(java.util.ResourceBundle bundle, java.lang.String key)
          Returns associated sentence to that key
static java.lang.String get(java.util.ResourceBundle bundle, java.lang.String key, boolean parameter)
          Returns translated key with instanciated parameters
static java.lang.String get(java.util.ResourceBundle bundle, java.lang.String key, int parameter)
          Returns translated key with instanciated parameters
static java.lang.String get(java.util.ResourceBundle bundle, java.lang.String key, long parameter)
          Returns translated key with instanciated parameters
static java.lang.String get(java.util.ResourceBundle bundle, java.lang.String key, java.lang.Object parameter)
          Same as above but implies creation of an array for the parameter
static java.lang.String get(java.util.ResourceBundle bundle, java.lang.String key, java.lang.Object[] parameters)
          Replace REPLACE_CHAR in the translated message with parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18N

public I18N()
Method Detail

get

public static java.lang.String get(java.util.ResourceBundle bundle,
                                   java.lang.String key)
Returns associated sentence to that key

Parameters:
key - the key to find in the translation file
bundle - then translation bundle to use
Returns:
the corresponding sentence of the key if not found

get

public static java.lang.String get(java.util.ResourceBundle bundle,
                                   java.lang.String key,
                                   boolean parameter)
Returns translated key with instanciated parameters

Parameters:
bundle - then translation bundle to use
key - the key to find in translation file.
parameter - the parameter value
Returns:
the corresponding sentence with key and parameters

get

public static java.lang.String get(java.util.ResourceBundle bundle,
                                   java.lang.String key,
                                   int parameter)
Returns translated key with instanciated parameters

Parameters:
bundle - then translation bundle to use
key - the key to find in translation file.
parameter - the parameter value
Returns:
the corresponding sentence with key and parameters

get

public static java.lang.String get(java.util.ResourceBundle bundle,
                                   java.lang.String key,
                                   long parameter)
Returns translated key with instanciated parameters

Parameters:
bundle - then translation bundle to use
key - the key to find in translation file.
parameter - the parameter value
Returns:
the corresponding sentence with key and parameters

get

public static java.lang.String get(java.util.ResourceBundle bundle,
                                   java.lang.String key,
                                   java.lang.Object[] parameters)
Replace REPLACE_CHAR in the translated message with parameters. If you have more parameters than charaters to replace, remaining parameters are appended as a comma separated list at the end of the message.

Parameters:
bundle - then translation bundle to use
key - the key to find in the translation file
parameters - to put inside square braquets
Returns:
the corresponding sentence of the key if not found

get

public static java.lang.String get(java.util.ResourceBundle bundle,
                                   java.lang.String key,
                                   java.lang.Object parameter)
Same as above but implies creation of an array for the parameter

Parameters:
bundle - then translation bundle to use
key - to translate
parameter - to put in translation
Returns:
translated message


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.