intl/strres/public/nsIStringBundleOverride.idlScriptable
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.7

Implemented 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.