|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.langmgr.EncodedLanguageResourceBundleLoader
public class EncodedLanguageResourceBundleLoader
A resource bundle loader interface for a language resources. See the Localization chapter of the Aria User Guide for more detail.
Aria uses standard property files for localization. These localization files can be set for an individual page (by setting the 'resource' attribute of the Page element or for the component factory. The project's resource manager is used to identify the current locale and the name of the property file by default.
This resource loader allows resource bundles in non-latin encodings to be loaded. The loader also processes a list of font substitutions
Copyright (c) Formaria Ltd., 2008, see license.txt for licesning information
$Revision: 1.2 $
| Field Summary | |
|---|---|
protected Project |
currentProject
|
protected java.lang.String |
encoding
|
protected java.util.Properties |
encodingProperties
|
| Constructor Summary | |
|---|---|
EncodedLanguageResourceBundleLoader(Project project)
Creates a new instance of EncodedLanguageResourceBundleLoader |
|
| Method Summary | |
|---|---|
java.lang.String |
getLanguageProperty(java.lang.String key)
Get a property associated with the language of the current resource bundle. |
java.util.ResourceBundle |
getResourceBundle(java.lang.String name)
Get the named resource bundle |
void |
setEncoding(java.lang.String nextEncoding)
Set the default encoding for loading of the next resource bundle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String encoding
protected Project currentProject
protected java.util.Properties encodingProperties
| Constructor Detail |
|---|
public EncodedLanguageResourceBundleLoader(Project project)
| Method Detail |
|---|
public void setEncoding(java.lang.String nextEncoding)
nextEncoding - the next encoding to use when reading a resource bundle filepublic java.util.ResourceBundle getResourceBundle(java.lang.String name)
getResourceBundle in interface ResourceBundleLoadername - the bundle name
public java.lang.String getLanguageProperty(java.lang.String key)
key - the key to lookup
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||