convert language files to json format

This commit is contained in:
401Unauthorized
2022-12-27 18:11:53 +08:00
parent 1a9b013fc2
commit ae3a543b3b
38 changed files with 16670 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
import { currentLocale } from "../i18n";
import { setPageLocale } from "../util-frontend";
const langModules = import.meta.glob("../languages/*.js");
const langModules = import.meta.glob("../lang/*.json");
export default {
data() {
@@ -24,7 +24,7 @@ export default {
methods: {
/** Change the application language */
async changeLang(lang) {
let message = (await langModules["../languages/" + lang + ".js"]()).default;
let message = (await langModules["../lang/" + lang + ".json"]()).default;
this.$i18n.setLocaleMessage(lang, message);
this.$i18n.locale = lang;
localStorage.locale = lang;