Package com.dassault_systemes.catweb.tools.resource |
java.lang.Object
|
+-com.dassault_systemes.catweb.tools.resource.Language
Framework : PortalBase
Module : PLBtools
public abstract class Language
Abstract Class for NLS widgets and messages management.
This class need to be extended by the developers for their components.
The Locale selected by the end user is automatically updated at the launch of the Portal.
Language(String _widgetsFile, String _messagesFile)
|
widgetsRB
PropertyResourceBundle widgetsRB
messagesRB
PropertyResourceBundle messagesRB
widgetsFile
String widgetsFile
messagesFile
String messagesFile
Language
Language(String _widgetsFile, String _messagesFile)
Constructor with the name of widget and message NLS files
getLocale
Locale getLocale()
Returns the current Locale used by the Portal
setLocale
void setLocale(Locale newLocale)
Sets the Locale used by the Portal
registerLanguage
void registerLanguage(Language language)
Register all the languages so that we can change their locale if a locale modification occurs
createResourceBundle
PropertyResourceBundle createResourceBundle(String baseFilename)
Creates and returns a PropertyResourceBundle object with a baseFileName
using the Class to find a file named [baseFileName]_[2letter ISO639 code language].properties
Example : widgets_en.properties
- Returns:
null if the file for the current locale is not found
_getWidgetsString
String _getWidgetsString(String key)
Returns the translated widget name sepcified by its key in the current locale.
If the key is not found in the widgets file, the key value is returned.
_getMessagesString
String _getMessagesString(String key)
Returns the translated nessage sepcified by its key in the current locale.
If the key is not found in the messages file, the key value is returned.
Copyright © 2000, Dassault Systèmes. All rights reserved