"use strict"; const common_vendor = require("../common/vendor.js"); const weight$1 = "{heavy}KG"; const selectLanguage$1 = "Select Language"; const en = { weight: weight$1, "app.name": "En Title", selectLanguage: selectLanguage$1 }; const weight = "{heavy}公斤"; const selectLanguage = "选择的语言"; const zhHans = { "app.name": "中文标题", weight, selectLanguage }; const messages = { en, "zh-Hans": zhHans // key 不能乱写,查看截图 screenshots/i18n.png }; const i18n = common_vendor.createI18n({ locale: common_vendor.index.getLocale(), // 获取已设置的语言,fallback 语言需要再 manifest.config.ts 中设置 messages }); console.log(common_vendor.index.getLocale()); console.log(i18n.global.locale); exports.i18n = i18n; //# sourceMappingURL=index.js.map