N
Nuxt7mo ago
Furnaxe

NuxtUI + i18n

Hello, my translation works but as soon as I change language and open my nuxtUI slideover the language doesn't change whereas on my view everything is fine. Any ideas ?
5 Replies
xibman
xibman7mo ago
Hello can you share the code inside it ? @Furnaxe which mode do you use normal or programatically ?
Furnaxe
FurnaxeOP7mo ago
On a component that includes the menu, I have this:
const { t } = useI18n()
const navigation = [
{ name: t('header.home'), href: '/', chevron: false, news: false, soon: false },
const { t } = useI18n()
const navigation = [
{ name: t('header.home'), href: '/', chevron: false, news: false, soon: false },
xibman
xibman7mo ago
okay easy one put every thing into a computed for the navigation const navigation = computed (() => [ { name: t('header.home'), href: '/', chevron: false, news: false, soon: false },)
Furnaxe
FurnaxeOP7mo ago
you're a boss ❤️ @xibman
xibman
xibman7mo ago
if you don't use a computed name: t('header.home') is static to keep reactivity regarding language change you need a computed
Want results from more Discord servers?
Add your server