2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2003-08-16 18:51:28 +04:00
|
|
|
var strBundleService = null;
|
|
|
|
|
|
|
|
function srGetStrBundle(path)
|
|
|
|
{
|
|
|
|
var strBundle = null;
|
|
|
|
|
|
|
|
if (!strBundleService) {
|
|
|
|
try {
|
|
|
|
strBundleService =
|
2016-02-04 01:22:33 +03:00
|
|
|
Components.classes["@mozilla.org/intl/stringbundle;1"].getService();
|
|
|
|
strBundleService =
|
2003-08-16 18:51:28 +04:00
|
|
|
strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);
|
|
|
|
} catch (ex) {
|
|
|
|
dump("\n--** strBundleService failed: " + ex + "\n");
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-04 01:22:33 +03:00
|
|
|
strBundle = strBundleService.createBundle(path);
|
2003-08-16 18:51:28 +04:00
|
|
|
if (!strBundle) {
|
|
|
|
dump("\n--** strBundle createInstance failed **--\n");
|
|
|
|
}
|
|
|
|
return strBundle;
|
|
|
|
}
|