import { isBrowser } from "@antdv/pro-utils";
import enUSLocal from "./en-US.mjs";
import itITLocal from "./it-IT.mjs";
import koKRLocal from "./ko-KR.mjs";
import zhLocal from "./zh-CN.mjs";
import zhTWLocal from "./zh-TW.mjs";
const locales = {
  "zh-CN": zhLocal,
  "zh-TW": zhTWLocal,
  "en-US": enUSLocal,
  "it-IT": itITLocal,
  "ko-KR": koKRLocal
};
function getLanguage() {
  if (!isBrowser()) return "zh-CN";
  const lang = window.localStorage.getItem("umi_locale");
  return lang || window.g_locale || navigator.language;
}
function gLocaleObject() {
  const gLocale = getLanguage();
  return locales[gLocale] || locales["zh-CN"];
}
export {
  gLocaleObject,
  getLanguage
};
