Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.common.i18n.I18N Class Reference

Inheritance diagram for org.objectweb.cjdbc.common.i18n.I18N:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

String get (ResourceBundle bundle, String key)
String get (ResourceBundle bundle, String key, boolean parameter)
String get (ResourceBundle bundle, String key, int parameter)
String get (ResourceBundle bundle, String key, long parameter)
String get (ResourceBundle bundle, String key, Object[] parameters)
String get (ResourceBundle bundle, String key, Object parameter)

Detailed Description

This class defines a I18N

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 36 of file I18N.java.


Member Function Documentation

String org.objectweb.cjdbc.common.i18n.I18N.get ResourceBundle  bundle,
String  key,
Object  parameter
[static]
 

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

Definition at line 124 of file I18N.java.

00125   {
00126     return MessageFormat.format(get(bundle, key), new Object[]{parameter});
00127   }

String org.objectweb.cjdbc.common.i18n.I18N.get ResourceBundle  bundle,
String  key,
Object[]  parameters
[static]
 

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

Definition at line 110 of file I18N.java.

00112   {
00113     return MessageFormat.format(get(bundle, key), parameters);
00114   }

String org.objectweb.cjdbc.common.i18n.I18N.get ResourceBundle  bundle,
String  key,
long  parameter
[static]
 

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

Definition at line 93 of file I18N.java.

00094   {
00095     return MessageFormat.format(get(bundle, key), new Object[]{String
00096         .valueOf(parameter)});
00097   }

String org.objectweb.cjdbc.common.i18n.I18N.get ResourceBundle  bundle,
String  key,
int  parameter
[static]
 

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

Definition at line 79 of file I18N.java.

00080   {
00081     return MessageFormat.format(get(bundle, key), new Object[]{String
00082         .valueOf(parameter)});
00083   }

String org.objectweb.cjdbc.common.i18n.I18N.get ResourceBundle  bundle,
String  key,
boolean  parameter
[static]
 

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

Definition at line 65 of file I18N.java.

00066   {
00067     return MessageFormat.format(get(bundle, key), new Object[]{String
00068         .valueOf(parameter)});
00069   }

String org.objectweb.cjdbc.common.i18n.I18N.get ResourceBundle  bundle,
String  key
[static]
 

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

Definition at line 45 of file I18N.java.

00046   {
00047     try
00048     {
00049       return bundle.getString(key);
00050     }
00051     catch (Exception e)
00052     {
00053       return key;
00054     }
00055   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:01:41 2005 for C-JDBC by  doxygen 1.3.9.1