org.opensync.engine.util
Class I18n

java.lang.Object
  extended byorg.opensync.engine.util.I18n

public class I18n
extends java.lang.Object

This class is used to internationalize the application

It use the ressource bundle opensync


Field Summary
(package private)  java.util.HashMap _locales
           
(package private)  java.util.Locale fr_locale
           
(package private)  java.util.ResourceBundle messages
           
(package private)  java.util.Locale us_locale
           
 
Constructor Summary
protected I18n()
          Construct a I18n.
 
Method Summary
 java.lang.String format(java.lang.String key, java.lang.Object[] args)
          Get the formatted message correponding to the key key
 java.lang.String get(java.lang.String key)
          Get the message correponding to the key key
static I18n getInstance()
          Get the singleton instance of the I18n class
protected static void setInstance()
          Set the the singleton instance
 void setLocale(java.util.Locale locale)
           
 void setLocale(java.lang.String langue_country)
          Set the Localization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messages

java.util.ResourceBundle messages

_locales

java.util.HashMap _locales

fr_locale

java.util.Locale fr_locale

us_locale

java.util.Locale us_locale
Constructor Detail

I18n

protected I18n()
Construct a I18n. Use method getInstance() instead

Method Detail

getInstance

public static I18n getInstance()
Get the singleton instance of the I18n class


setInstance

protected static void setInstance()
Set the the singleton instance


get

public java.lang.String get(java.lang.String key)
Get the message correponding to the key key

Parameters:
key -

format

public java.lang.String format(java.lang.String key,
                               java.lang.Object[] args)
Get the formatted message correponding to the key key

Parameters:
key - the key of the message
args - the paramters of the message

setLocale

public void setLocale(java.lang.String langue_country)
               throws java.util.MissingResourceException
Set the Localization

Parameters:
langue_country - langue and country
Throws:
java.util.MissingResourceException

setLocale

public void setLocale(java.util.Locale locale)
               throws java.util.MissingResourceException
Throws:
java.util.MissingResourceException


Copyright © 2004 sourceforge. All Rights Reserved.