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.
この要素はプロパティファイルからローカライズされたリソースを読み込むために利用される。 この要素は stringbundleset 要素内に置く必要がある。
プロパティファイルは、1 行毎に key-value (キーと値) のペアを記したプロパティのリストである。key と value は等号記号でつなげられている。例えば次では 2 つのプロパティを定義している。
message.displayError=このメッセージを表示しようとしたときにエラーが発生しました
message.nameAlreadyUsed=名前 %s は既に別のアカウントにより使用されています.
属性:
src |
プロパティとメソッド:
appLocale | getFormattedString | getString | src | stringBundle |
属性:
src
Type: string properties file URL
The URL of the property file that contains the localized strings.
型 : string properties file URL
ローカライズ文字列のあるプロパティファイルの URL。
XUL Element から継承:
プロパティとメソッド:
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
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.
型 : nsILocale
ユーザロケールについての情報を保持している XPCOM オブジェクトを返す。このオブジェクトは 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
戻り値の型 : string
文字列バンドルから指定した key 名の文字列をフォーマット化したものを返す。ここで、 %s が出現するとその都度、渡した配列の連続する要素で置き換える。別のフォーマットコードを用いることもできる。
getString ( key )
Return Type: string
Returns the string with the given key name from the string bundle.
戻り値の型 : string
文字列バンドルから指定した key 名の文字列を返す。
src
Type: image URL
Gets and sets the value of the src attribute.
型 : image URL
src 属性の値を取得・設定する。
stringBundle
Type: nsIStringBundle
Returns the XPCOM string bundle object which implements nsIStringBundle.
型 : nsIStringBundle
nsIStringBundle を実装している XPCOM 文字列バンドルオブジェクトを返す。