corelib.runtime.internationalisation
Class ResourceBundle

java.lang.Object
  extended by corelib.runtime.internationalisation.ResourceBundle

public class ResourceBundle
extends java.lang.Object

This class load a resource bundle file (only at with Ellipse format, and not standard format). This type of file is writen in XML language and permits internationalization mechanisms.

Since:
0.2.0
Author:
Dominique Liard

Method Summary
 void computeLocaleInformations(corelib.runtime.internationalisation.ResourceBundle.LocaleInfos infos)
           
 java.util.Locale getLocale()
           
 java.lang.String getResource(java.lang.String key)
          Returns resource string associated to the specified key.
 java.lang.String getResource(java.lang.String key, java.util.Locale locale)
          Returns resource string associated to the specified key and locale.
 java.lang.String getResourcesFilename()
           
 void setLocale(java.util.Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResourcesFilename

public java.lang.String getResourcesFilename()

getLocale

public java.util.Locale getLocale()

setLocale

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

getResource

public java.lang.String getResource(java.lang.String key)
                             throws ResourceBundleException
Returns resource string associated to the specified key.

Parameters:
key - The key of the resource.
Returns:
The resource string.
Throws:
ResourceBundleException - Thrown if the searched resource not exists.

getResource

public java.lang.String getResource(java.lang.String key,
                                    java.util.Locale locale)
                             throws ResourceBundleException
Returns resource string associated to the specified key and locale.

Parameters:
key - The key of the resource.
locale - The considered locale.
Returns:
The resource string.
Throws:
ResourceBundleException - Thrown if the searched resource not exists.

computeLocaleInformations

public void computeLocaleInformations(corelib.runtime.internationalisation.ResourceBundle.LocaleInfos infos)
                               throws ResourceBundleException
Throws:
ResourceBundleException


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.