public static WGAResourceBundle getLabelBundle(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGAPIException, IOException {
TMLContext tmlContext = WGAGlobal.fetchInitialContext(cx);
Design design = (Design) thisObj;
Arguments varArgs = _getLabelBundleVarargs.parse(args);
WGAResourceBundleManager manager = tmlContext.getwgacore().getResourceBundleManager(design._designContext.getDesignDB());
String container = (String) varArgs.get("container");
if (container == null) {
container = WGAResourceBundleManager.CONTAINER_DEFAULT;
}
String file = (String) varArgs.get("file");
if (file == null) {
file = WGAResourceBundleManager.FILE_DEFAULT;
}
Locale locale = WGLanguage.languageNameToLocale((String) varArgs.get("language"));
return manager.getBundle(container, file, locale);
}