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

org.openmobileis.common.intl.IntlResourceManager Class Reference

List of all members.

Detailed Description

Title: OpenMobileIS project source
Description: Manage international resource.

Author:
Philippe Delrieu
Since:
JDK 1.1
Version:
1.0.

Definition at line 53 of file IntlResourceManager.java.

Public Member Functions

Properties loadLocalizedProperties (String fileName, String local) throws java.io.FileNotFoundException, java.io.IOException
 load the properties file with specified locale.
String getLocalizedFileName (String fileName)
 return the fileName transformed with the system local.
String removeLocaleFromFileName (String fileName)
 return the fileName without the current locale extension if present.
void addLocalizedProperties (String propertiesFile, String local) throws java.io.FileNotFoundException, java.io.IOException
 load the properties file with specified locale in the IntlResourceManager properties .
String getLocalizedProperty (String propKey)
void setLocalizedProperty (String key, String value)
String getLocalizedProperty (String propKey, String defaultValue)
String getManagerLocaleString ()
 return the local defined in the webserver property server.locale.
void setManagerLocal (String local)
Locale getManagerLocale ()

Static Public Member Functions

static IntlResourceManager getManager ()

Static Public Attributes

static final String DEFAULT = "fr"
 default extension extension : nothing
static final String FR = "fr"
 France local extension :fr.
static final String US = "us"
 United State local extension :us.
static final String EN = "en"
 England local extension :en.
static final String BE = "be"
 Belgium local extension :be.
static final String SW = "sw"
 Switzerland local extension :sw.
static final String DE = "de"
 Deutchland local extension :de.
static final String IT = "it"
 Italian local extension :it.
static final String ES = "es"
 Espana local extension :es.


Member Function Documentation

void org.openmobileis.common.intl.IntlResourceManager.addLocalizedProperties String  propertiesFile,
String  local
throws java.io.FileNotFoundException, java.io.IOException
 

load the properties file with specified locale in the IntlResourceManager properties .

Localized filename are of type filename.localExtension. If the localised file is not found try to load the filename (without extension). If it's failed return java.io.FileNotFoundException.

Parameters:
String fileName : non localized filename
local : locale of the file to load @ return the loaded properties
Exceptions:
: java.io.FileNotFoundException if the localized file and fileName is not found.
: java.io.IOException if an error occurs.

Definition at line 188 of file IntlResourceManager.java.

String org.openmobileis.common.intl.IntlResourceManager.getLocalizedFileName String  fileName  ) 
 

return the fileName transformed with the system local.

(ie:fileName.systemlocal). if the localized file does not exist return the specified filename.

Definition at line 154 of file IntlResourceManager.java.

Referenced by org.openmobileis.embedded.webserver.templates.TemplateManager.getTemplate().

String org.openmobileis.common.intl.IntlResourceManager.getManagerLocaleString  ) 
 

return the local defined in the webserver property server.locale.

If not defined default is use.

Definition at line 212 of file IntlResourceManager.java.

Properties org.openmobileis.common.intl.IntlResourceManager.loadLocalizedProperties String  fileName,
String  local
throws java.io.FileNotFoundException, java.io.IOException
 

load the properties file with specified locale.

Localized filename are of type filename.localExtension. If the localised file is not found try to load the filename (without extension). If it's failed return java.io.FileNotFoundException.

Parameters:
String fileName : non localized filename
local : locale of the file to load @ return the loaded properties
Exceptions:
: java.io.FileNotFoundException if the localized file and fileName is not found.
: java.io.IOException if an error occurs.

Definition at line 131 of file IntlResourceManager.java.

String org.openmobileis.common.intl.IntlResourceManager.removeLocaleFromFileName String  fileName  ) 
 

return the fileName without the current locale extension if present.

if not return the file name.

Definition at line 168 of file IntlResourceManager.java.


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:37 2005 for OpenMobileIS by  doxygen 1.4.4