2023-01-29 15:26:45 +08:00
|
|
|
import en from "./locale/en";
|
|
|
|
|
import zh from "./locale/zh_CN";
|
2025-03-07 18:01:51 +08:00
|
|
|
import { SupportedLanguagesType } from "/@/vben/locales";
|
|
|
|
|
export const messages = {
|
|
|
|
|
"en-US": {
|
2023-01-29 15:26:45 +08:00
|
|
|
label: "English",
|
|
|
|
|
...en
|
|
|
|
|
},
|
2025-03-07 18:01:51 +08:00
|
|
|
"zh-CN": {
|
2023-01-29 15:26:45 +08:00
|
|
|
label: "简体中文",
|
|
|
|
|
...zh
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2025-03-07 18:01:51 +08:00
|
|
|
// export default createI18n({
|
|
|
|
|
// legacy: false,
|
|
|
|
|
// locale: "zh-cn",
|
|
|
|
|
// fallbackLocale: "zh-cn",
|
|
|
|
|
// messages
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
export async function loadMessages(lang: SupportedLanguagesType) {
|
|
|
|
|
return messages[lang];
|
|
|
|
|
}
|