Skip to content

Why Per-component translations not working? #2127

Answered by steinerd
mrFANRA asked this question in Q&A
Discussion options

You must be logged in to vote

https://stackblitz.com/edit/nuxt-starter-zczwyp?file=components%2Fdemo-component.vue

I forked it.

You'll need to add, and replace $t() with just t()

const { t } = useI18n({ useScope: 'local' });

Ideally in the setup routine.

And you'll optionally want to add the scoped attribute to your <i18n> custom block.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mrFANRA
Comment options

@steinerd
Comment options

Answer selected by mrFANRA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants