feat:#60 added localization switch

This commit is contained in:
masterelmar
2023-11-15 12:46:56 +01:00
parent 3f1a592468
commit 00399c32d9
11 changed files with 204 additions and 98 deletions

View File

@@ -0,0 +1,17 @@
import { defineStore } from "pinia";
import { useLocalStorage } from "@vueuse/core"
const localeStore = defineStore("localeStore", {
state: () => {
return {
locale: useLocalStorage('locale', "en"), //useLocalStorage takes in a key of 'count' and default value of 0
};
},
actions: {
setLocale(locale: string) {
this.locale = locale;
},
},
});
export default localeStore;