【发布时间】:2017-05-16 10:37:16
【问题描述】:
目前,我正在尝试使用各种其他语言本地化我的 Chrome 扩展程序,并且我正在使用 i189.getmessage 从 _locales 获取变量消息,然后我想在 const 对象字典中使用它。下面是代码:
var stad = chrome.i18n.getMessage("stand");
const emoji_map = {
"__1_person__": "????",
"2 people": "????",
"3 people": "????",
"4 people": "????",
"stad": "sdss",
}
我想用stad 变量的值代替"stad",但不知道该怎么做。
【问题讨论】:
标签: javascript google-chrome google-chrome-extension