var isOk=false; // success flag var keys=""; // var to hold rb keys var thisKey=""; var thisMSG=""; var thisLang=listFirst(variables.Locale,"_"); var thisDir=GetDirectoryFromPath(variables.rbFile); var thisFile=getFileFromPath(variables.rbFile); var thisRBfile=thisDir & listFirst(thisFile,".") & "_"& variables.Locale & "." & listLast(thisFile,"."); if (NOT fileExists(thisRBfile))// still nothing? strip thisRBfile back to base rb thisRBfile=thisDir & thisLang & "." & listLast(thisFile,"."); if (NOT fileExists(thisRBfile)) //try just the language thisRBfile=thisDir & listFirst(thisFile,".") & "_"& thisLang & "." & listLast(thisFile,"."); if (NOT fileExists(thisRBfile))// still nothing? strip thisRBfile back to base rb thisRBFile=variables.rbFile; if (fileExists(thisRBFile)) { // final check, if this fails the file is not where it should be isOK=true; fis.init(thisRBFile); rB.init(fis); keys=rB.getKeys(); while (keys.hasMoreElements()) { thisKEY=keys.nextElement(); thisMSG=rB.handleGetObject(thisKey); variables.resourceBundle["#thisKEY#"]=thisMSG; } fis.close(); } var test=""; var isOK=true; try { test=msgFormat.init(arguments.pattern); } catch (Any e) { isOK=false; } return isOk;