refactor(i18n): improve language handling and UI updates

- Enhanced language setting logic in App.vue and AppHeader.vue to support reactive updates without page reloads.
- Updated language options in AppHeader.vue to use native labels for improved clarity.
- Introduced a utility function in i18n/index.js to streamline locale updates, ensuring consistent language handling across the application.
This commit is contained in:
Torsten Schulz (local)
2026-04-07 15:52:16 +02:00
parent a9413ef666
commit fd7f2e2474
3 changed files with 38 additions and 8 deletions

View File

@@ -65,7 +65,13 @@ export default {
MultiChatDialog,
},
created() {
this.$i18n.locale = this.$store.getters.language;
const code = this.$store.getters.language;
const loc = this.$i18n.locale;
if (loc && typeof loc === 'object' && 'value' in loc) {
loc.value = code;
} else {
this.$i18n.locale = code;
}
},
};
</script>