nsIStringBundleOverride 编辑
intl/strres/public/nsIStringBundleOverride.idl
Scriptable Provides the string bundle override service; this interface is an implementation detail. You should never need to use it directly. Inherits from: nsISupports
Last changed in Gecko 1.7Implemented by: @mozilla.org/intl/stringbundle/text-override;1
. To create an instance, use:
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle/text-override;1"] .getService(Components.interfaces.nsIStringBundleOverride);Note: You should never need to use this service directly. Instead, the string bundle service will automatically try to load this service. If there is no
custom-strings.txt
file then the service will fail to load.Method overview
nsISimpleEnumerator enumerateKeysInBundle(in AUTF8String url); |
AString getStringFromName(in AUTF8String url, in ACString key); |
Methods
enumerateKeysInBundle()
Get all override keys for a given string bundle.
nsISimpleEnumerator enumerateKeysInBundle( in AUTF8String url );
Parameters
url
- The URL of the original string bundle whose keys are to be overridden.
Return value
An enumeration of nsIPropertyElement objects for the keys that are overridden in the given string bundle. Note that these keys may not exist in the original string bundle.
getStringFromName()
Get the override value for a particular key in a particular string bundle.
AString getStringFromName( in AUTF8String url, in ACString key );
Parameters
url
- The URL of the original string bundle whose keys are to be overridden.
key
- The key to be overridden.
Return value
The override value. An exception is thrown if the key has not been overridden. However, no exception is thrown if the original string bundle did not have the key.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论