Skip to content

Commit 65d9566

Browse files
authored
i18n.global.locale is a ref (#1105)
* i18n.global.locale is a ref i18n.global.locale is a ref - so the example should be assigning to it in the correct manner * More clarification based on the legacy flag
1 parent b6cd58e commit 65d9566

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/guide/essentials/scope.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ createApp({
103103

104104

105105
// change locale via `global` property
106+
107+
// when vue-i18n is being used with legacy: false, note that i18n.global.locale is a ref, so we must set it via .value:
108+
i18n.global.locale.value = 'en'
109+
110+
// otherwise - when using legacy: true, we set it like this:
106111
i18n.global.locale = 'en'
107112
```
108113

0 commit comments

Comments
 (0)