将语言常量存储在index.js
中是个好主意吗?该常量用于推送通知。
还有,是否有适合lang常量的格式?谢谢。
const stringPushSomethingNew = "pushSomethingNew";
const stringPushTwoStuffAnd = "pushTwoStuffAnd";
const stringPushRentsSells = "pushRentsSells";
const stringPushRents = "pushRents";
const stringPushSells = "pushSells";
var mapStringsEn = new Object();
mapStringsEn[stringPushSomethingNew] = "Something new";
mapStringsEn[stringPushTwoStuffAnd] = "and";
mapStringsEn[stringPushRentsSells] = "rents out and sells";
mapStringsEn[stringPushRents] = "rents out";
mapStringsEn[stringPushSells] = "sells";
mapStringsEn["2000"] = "Gadget";
mapStringsEn["2001"] = "Mobile phone";
mapStringsEn["2002"] = "Smartphone";
mapStringsEn["2003"] = "Tablet";