mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
add files
This commit is contained in:
1 parent
ed55ae31d8
commit
5db0050584
15 files changed
+90
-5
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import ZHCN from "./zh-CN";
|
||||
import ZHTW from "./zh-TW";
|
||||
import EN from "./en";
|
||||
import JP from "./jp";
|
||||
|
||||
const i18nMap = {
|
||||
"zh": ZHCN,
|
||||
"zh-CN": ZHCN,
|
||||
"zh-TW": ZHTW,
|
||||
"en": EN,
|
||||
"jp": JP
|
||||
};
|
||||
|
||||
export default class I18n {
|
||||
constructor({ option }) {
|
||||
this.language = i18nMap[option.language || "en"];
|
||||
}
|
||||
|
||||
get(key) {
|
||||
return this.language[key] || key;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user