mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-11-04 13:46:13 +08:00 
			
		
		
		
	convert language files to json format
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user