Skip to content

Commit

Permalink
docs: add lang switching vue-i18n caveat (#2796)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede authored Feb 16, 2024
1 parent cf8cd25 commit de07830
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/content/docs/2.guide/8.lang-switcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,7 @@ definePageMeta({
<!-- pages/[...pathMatch].vue -->
</template>
```
## Vue i18n caveat
In contrast to Vue i18n you should not directly set `locale`, switch language by using [`setLocale`](/docs/api/vue-i18n#setlocale) or navigating to a route returned by [`switchLocalePath`](/docs/api#useswitchlocalepath). This loads translations, triggers hooks and updates the locale cookie if used.

0 comments on commit de07830

Please sign in to comment.