Is hutopy finally trilangual

This commit is contained in:
2025-04-19 01:56:59 -04:00
parent af71c5e952
commit b1681252cc
140 changed files with 5441 additions and 1085 deletions

View File

@@ -5,16 +5,21 @@ import { useI18n } from 'vue-i18n'
export const useLanguageStore = defineStore(
'language',
() => {
const { locale } = useI18n()
// Initialize with the stored value or default to 'fr'
const storedLocale = useSessionStorage('user-locale', 'fr')
// Get i18n instance
const { locale } = useI18n()
// Set the initial locale from storage
locale.value = storedLocale.value
if (locale && storedLocale.value) {
locale.value = storedLocale.value
}
function setLocale(newLocale) {
locale.value = newLocale
if (locale) {
locale.value = newLocale
}
storedLocale.value = newLocale
}