1
zzzz
2024-04-18 683f19a8632a197353cc40068a9a7a0de8ed727b
src/locales/index.js
@@ -1,12 +1,11 @@
import Vue from "vue";
import VueI18n from "vue-i18n";
import en from "./en.js";
// import en from "./zh.js";
import india from "@/locales/india";
import tw from "@/locales/tw";
import ty from "@/locales/taiyu.js";
import ry from "@/locales/riyu.js";
import hy from "@/locales/hanyu.js";
import en from "./en.json";
import india from "@/locales/hi.json";
import tw from "@/locales/cht.json";
import ty from "@/locales/th.json";
import ry from "@/locales/jp.json";
import hy from "@/locales/kor.json";
Vue.use(VueI18n);
@@ -14,24 +13,24 @@
const LOCALE_KEY = "language";
const locales = {
  "zh-CN": {
    ...en
  },
  en: {
    ...india
    ...en,
  },
  tw: {
    ...tw
  hi: {
    ...india,
  },
  ty: {
    ...ty
  "zh-TW": {
    ...tw,
  },
  ry: {
    ...ry
  th: {
    ...ty,
  },
  hy: {
    ...hy
  }
  ja: {
    ...ry,
  },
  ko: {
    ...hy,
  },
};
// en-us  zh-cn
// let langLocale = getCookie(LOCALE_KEY) || 'en';
@@ -44,17 +43,17 @@
const i18n = new VueI18n({
  locale: langLocale,
  messages: locales,
  silentTranslationWarn: true
  silentTranslationWarn: true,
});
const init = Vue.prototype._init;
Vue.prototype._init = function(options) {
Vue.prototype._init = function (options) {
  init.call(this, {
    i18n,
    ...options
    ...options,
  });
};
export const setup = lang => {
export const setup = (lang) => {
  if (lang === undefined) {
    // lang = window.localStorage.getItem(LOCALE_KEY);
    // const language = getCookie(LOCALE_KEY);