Files
HTFX-CRM-Sales/locale/index.ts
2025-07-07 16:05:18 +08:00

33 lines
805 B
TypeScript

import arSA from './ar-SA.json';
import enUS from './en-US.json';
import esES from './es-ES.json';
import hiIN from './hi-IN.json';
import inID from './in-ID.json';
import koKR from './ko-KR.json';
import thTH from './th-TH.json';
import viVN from './vi-VN.json';
import zhCN from './zh-CN.json';
import zhTW from './zh-TW.json';
import { locales, defaultLocale } from '@/utils/const';
import { createI18n } from 'vue-i18n';
const messages = {
'ar-SA': arSA,
'en-US': enUS,
en: enUS,
'es-ES': esES,
'hi-IN': hiIN,
'in-ID': inID,
'ko-KR': koKR,
'th-TH': thTH,
'vi-VN': viVN,
'zh-CN': zhCN,
'zh-TW': zhTW
};
const locale = uni.getLocale();
let i18nConfig = {
locale: locales.includes(locale) ? locale : defaultLocale,
messages
};
const i18n = createI18n(i18nConfig);
export { messages, i18n };