acdr-ui/dist/dev/mp-weixin/locale/index.js
2024-10-01 09:15:35 +08:00

30 lines
780 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"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;