|
ColdBox Platform Version 3.1.0 | ||||
| FRAMES | |||||
WEB-INF.cftags.component
coldbox.system.FrameworkSupertype
coldbox.system.Plugin
coldbox.system.plugins.ResourceBundle
public class ResourceBundle
Reads and parses java resource bundles per locale
| 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=''])
returns array of keys in java resource bundle per locale |
any |
getRBString(any rbFile, any rbKey, [any rbLocale=''], [any default])
returns text for given key in given java resource bundle per locale |
any |
getResource(any resource, [any default], [any locale='[runtime expression]'])
Returns bundle resource from loaded bundle, if it exists, according to locale |
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 library 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=''])
performs messageFormat on compound rb string |
boolean |
verifyPattern(string pattern)
performs verification on MessageFormat pattern |
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
public init(any controller)
controller| Method Detail |
|---|
public string formatRBString(string rbString, any substituteValues)
rbStringsubstituteValues - Array or single value to format.public array getRBKeys(any rbFile, [any rbLocale=''])
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, if not passed, defaults to default locale.public any getRBString(any rbFile, any rbKey, [any rbLocale=''], [any default])
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_USdefault - A default value to send back if resource not foundpublic any getResource(any resource, [any default], [any locale='[runtime expression]'])
getResource
in class
FrameworkSupertype
resource - The resource to retrieve from the loaded bundle.default - A default value to send back if resource not foundlocale - Pass in which locale to take the resource from. By default it uses the user's current set localepublic 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.rbLocalepublic string messageFormat(string thisPattern, any args, [any thisLocale=''])
thisPattern - pattern to use in formattingargs - substitution values, simple or arraythisLocale - locale to use in formatting, defaults to en_USpublic boolean verifyPattern(string pattern)
pattern - format pattern to test
|
ColdBox Platform Version 3.1.0 | ||||
| FRAMES | |||||