XUL:stringbundle
From MDC
« XUL Reference home [ Examples | Attributes | Properties | Methods | Related ]
An element which can be used to load localized resources from property files. Stringbundles should be placed inside a stringbundleset element.
A property file is a list of property key-value pairs each on a separate line. The key and value is separated with an equals sign. For example, the following defines two properties:
message.displayError=An error occured trying to display this message message.nameAlreadyUsed=The name %S is already being used by another account.
More information is available in the XUL tutorial.
- Attributes
- src
- Properties
- appLocale Obsolete, src, stringBundle, strings
- Methods
- getFormattedString, getString
[edit] Examples
(example needed)
[edit] Attributes
- src
- Type: string properties file URL
- The URL of the property file that contains the localized strings.
|
Inherited from XUL element |
[edit] Properties
|
Inherited from XUL element Inherited from DOM element |
- appLocale Obsolete
- Type: nsILocale
- Returns the XPCOM object which holds information about the user's locale. This is an object which implements nsILocale.
Gecko 1.9.1 note
This property was removed in Gecko 1.9.1.
- stringBundle
- Type: nsIStringBundle
- Returns the XPCOM string bundle object which implements nsIStringBundle.
- strings
- Type: nsISimpleEnumerator
- An enumeration of all of the strings in the string bundle. The enumeration contains nsIPropertyElement objects.
[edit] Methods
- getFormattedString( key, strArray )
- Return type: string
- Returns a formatted string with the given key name from the string bundle, where each occurrence of
%S(uppercase) is replaced by each successive element in the supplied array. You may also use other formatting codes.
- getString( key )
- Return type: string
- Returns the string with the given key name from the string bundle.
|
Inherited from XUL element Inherited from DOM element |
[edit] Related
TBD