Firefox format (ResourceBlender)

From Lime 49 Wiki
Jump to: navigation, search

This format is used by extensions for Mozilla Firefox (among others) and consists of a contents.rdf, .properties and .dtd file for each language in the extension.

To access the resource bundles from an extension, first add a stringbundle tag to the XUL page on which the JavaScript file is included, then obtain a DOM reference to it and call getString. For example:


<stringbundleset id="stringbundleset">

    <stringbundle id="my-bundle" src="chrome://myextension/locale /"/>



var bundle = document.getElementById('my-bundle');


Elements in the XUL bundle can be accessed as XML entities. Eg:

<menuitem label="&myelement;">

See Also

Back to ResourceBlender Help Contents

Personal tools