Move i18n to new store
This commit is contained in:
parent
edfaf5e80c
commit
aa98e83ff0
5 changed files with 27 additions and 7 deletions
14
src/stores/i18n.js
Normal file
14
src/stores/i18n.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useI18nStore = defineStore('i18n', {
|
||||
state: () => ({
|
||||
i18n: null
|
||||
}),
|
||||
actions: {
|
||||
setI18n (newI18n) {
|
||||
this.$patch({
|
||||
i18n: newI18n.global
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue