Skip to content

Commit 0120e80

Browse files
committed
docs: update migration
1 parent b0b21e0 commit 0120e80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/guide/migration/breaking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const ErrorMessage = {
106106
}
107107
```
108108

109-
In Vue I18n v9 or later, it change to be using `$tm` or `tm`. The following Composition API example:
109+
In Vue I18n v9 or later, it change to be getting locale messages with `$tm` / `tm`, and to resolve locale messages with `$rt` or `rt`. The following Composition API example:
110110

111111
```js{24}
112112
// e.g. Array structure locale messages
@@ -132,8 +132,8 @@ const ErrorMessage = {
132132
},
133133
template: `<p class="error">{{ errors(code) }}</p>`,
134134
setup() {
135-
const { tm } = useI18n()
136-
const errors = (code) => tm('errors')[code]
135+
const { tm, rt } = useI18n()
136+
const errors = (code) => rt(tm('errors')[code])
137137
return { errors }
138138
}
139139
}

0 commit comments

Comments
 (0)