Stringbundle
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 about stringbundle
Attributes:
src |
Properties and Methods:
appLocale | getFormattedString | getString | src | stringBundle |
strings |
Attributes:
src
Type: string properties file URL
The URL of the property file that contains the localized strings.
Inherited from XUL Element:
Properties and Methods:
Inherited from XUL Element:
align
allowEvents
blur
boxObject
boxObject.element
boxObject.getLookAndFeelMetric
boxObject.height
boxObject.screenX
boxObject.screenY
boxObject.width
boxObject.x
boxObject.y
builder
className
click
collapsed
contextMenu
controllers
database
datasources
dir
doCommand
flex
focus
getElementsByAttribute
height
hidden
id
left
maxHeight
maxWidth
menu
minHeight
minWidth
observes
ordinal
orient
pack
persist
ref
resource
statusText
style
tooltip
tooltipText
top
width
Inherited from Element:
addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName
appLocale
Type: nsILocale
Returns the XPCOM object which holds information about the user's locale. This is an object which implements nsILocale.
getFormattedString ( key , strArray )
Return Type: string
Returns a formatted string with the given key name from the string bundle, where each occurance of %s 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.
src
Type: image URL
Gets and sets the value of the src attribute.
stringBundle
Type: nsIStringBundle
Returns the XPCOM string bundle object which implements nsIStringBundle.
strings Mozilla 1.8
Type: nsISimpleEnumerator
An enumeration of all of the strings in the string bundle. The enumeration contains nsIPropertyElement objects.