|
ColdBox Platform Version 2.6.3 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.frameworkSupertype
coldbox.system.plugin
coldbox.system.plugins.resourceBundle
public class resourceBundle
reads and parses java resource bundle per locale: version 1.0.0 coldbox core java 8-jul-2006 paul@sustainableGIS.com
Constructor Summary | |
---|---|
init(any controller)
Constructor |
Method Summary | |
---|---|
string |
formatRBString(string rbString, any substituteValues)
performs messageFormat like operation on compound rb string |
array |
getRBKeys(any rbFile, [any rbLocale='en_US'])
returns array of keys in java resource bundle per locale |
any |
getRBString(any rbFile, any rbKey, [any rbLocale='en_US'])
returns text for given key in given java resource bundle per locale |
any |
getResource(any resource)
Returns bundle resource from loaded bundle, if it exists, according to locale. To get a resource string from non loaded RB's, use getRBString |
any |
getResourceBundle(any rbFile, [any rbLocale='en_US'])
Reads,parses and RETURNS a resource bundle in structure format |
struct |
getVersion()
returns version of this CFC and java lib it uses. |
void |
loadBundle(string rbFile, [string rbLocale='en_US'])
Reads,parses and saves the resource bundle per locale in internal ColdBox structures. |
string |
messageFormat(string thisPattern, any args, [any thisLocale='en_US'])
performs messageFormat on compound rb string |
private void |
setupInstance()
Sets up the instance objects for usage. Pulled from init for performance. |
boolean |
verifyPattern(string pattern)
performs verification on MessageFormat pattern |
Methods inherited from class coldbox.system.plugin |
---|
getPluginDescription, getPluginName, getPluginVersion, getpluginPath, setPluginDescription, setPluginName, setPluginVersion
|
Methods inherited from class WEB-INF.cftags.component |
---|
|
Constructor Detail |
---|
public init(any controller)
Method Detail |
---|
public string formatRBString(string rbString, any substituteValues)
rbString
substituteValues
- Array or single value to format.public array getRBKeys(any rbFile, [any rbLocale='en_US'])
rbFile
- This must be the path + filename UP to but NOT including the locale. We auto-add the local and .properties to the end.rbLocale
- The locale to use.public any getRBString(any rbFile, any rbKey, [any rbLocale='en_US'])
rbFile
- This must be the path + filename UP to but NOT including the locale. We auto-add the local and .properties to the end.rbKey
- The key to retrieverbLocale
- The locale of the bundle. Default is en_USpublic any getResource(any resource)
getResource
in class
frameworkSupertype
resource
- The resource to retrieve from the loaded bundle.public any getResourceBundle(any rbFile, [any rbLocale='en_US'])
rbFile
- This must be the path + filename UP to but NOT including the locale. We auto-add the local and .properties to the end.rbLocale
- The locale of the resource bundlepublic struct getVersion()
public void loadBundle(string rbFile, [string rbLocale='en_US'])
rbFile
- This must be the path + filename UP to but NOT including the locale. We auto-add .properties to the end.rbLocale
public string messageFormat(string thisPattern, any args, [any thisLocale='en_US'])
thisPattern
- pattern to use in formattingargs
- substitution valuesthisLocale
- locale to use in formatting, defaults to en_USprivate void setupInstance()
public boolean verifyPattern(string pattern)
pattern
- format pattern to test
|
ColdBox Platform Version 2.6.3 | ||||
FRAMES |