add layer

This commit is contained in:
Harvey Zack committed 2018-10-15 11:31:06 +08:00
1 parent e4518d21ce
commit 4327787895
15 files changed
+256 -134

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
const i18nMap = {
'zh-cn': {
'About author': '关于作者',
'Video info': '视频统计信息'
},
'zh-tw': {
'About author': '關於作者',
'Video info': '影片統計訊息'
}
};
export default class I18n {
constructor({ option }) {
this.language = i18nMap[option.lang.toLowerCase()] || i18nMap.en;
}
get(key) {
return this.language[key] || key;
}
}