This commit is contained in:
2019-04-08 17:41:51 +00:00
parent 83f5df92ab
commit 6e3669ad7c
3 changed files with 20 additions and 2 deletions

View File

@@ -114,5 +114,19 @@ export default {
shortDateAndTime: "YYYY-MM-DD hh:mm:ss A"
},
//timeZoneOffset is in decimal hours
timeZoneOffset: -8.0
timeZoneOffset: -8.0,
////////////////////////////////////////////////////////
// Take in a string that contains one or more
//locale keys between square brackets
//translate each and return the string translated
//
translateString(s) {
var ret = s;
var pattern = /\[(.*?)\]/g;
var match;
while ((match = pattern.exec(s)) != null) {
ret.replace(match, this.get(match));
}
return ret;
}
};