This reverts commit 829018b656c52e8f8dc8bd5a9f74e83f46b71567.
This commit is contained in:
Henry Jameson 2026-02-13 14:48:39 +02:00
commit 6f3f75d9b4
2 changed files with 34 additions and 0 deletions

14
src/lib/language.js Normal file
View file

@ -0,0 +1,14 @@
import { useI18nStore } from 'src/stores/i18n.js'
export const piniaLanguagePlugin = ({ store, options }) => {
if (store.$id === 'sync_config') {
store.$onAction(({ name, args }) => {
if (name === 'setPreference') {
const { path, value } = args[0]
if (path === 'simple.interfaceLanguage') {
useI18nStore().setLanguage(value)
}
}
})
}
}