@kong-ui-public/i18n 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ import { createI18n, Translation } from '@kong-ui-public/i18n'
|
|
|
37
37
|
import english from './locales/en.json'
|
|
38
38
|
|
|
39
39
|
const i18n = createI18n<typeof english>('en-us', english, true)
|
|
40
|
-
app.use(Translation
|
|
40
|
+
app.use(Translation.install<typeof english>, { i18n })
|
|
41
41
|
|
|
42
42
|
// composables/index.ts
|
|
43
43
|
import { useI18n } from '@kong-ui-public/i18n'
|
|
@@ -61,7 +61,7 @@ import english from './locales/en.json'
|
|
|
61
61
|
|
|
62
62
|
const i18n = createI18n<typeof english>('en-us', english, true)
|
|
63
63
|
const app = createApp(App)
|
|
64
|
-
app.use(Translation
|
|
64
|
+
app.use(Translation.install<typeof english>, { i18n })
|
|
65
65
|
|
|
66
66
|
app.mount('#app')
|
|
67
67
|
```
|
|
@@ -236,7 +236,7 @@ import english from './locales/en.json'
|
|
|
236
236
|
//this will create Application instance of Intl object
|
|
237
237
|
const i18n = createI18n<typeof english>('en-us', english, true)
|
|
238
238
|
// this will register <i18n-t> component
|
|
239
|
-
app.use(Translation
|
|
239
|
+
app.use(Translation.install<typeof english>, { i18n })
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
And then, anywhere in application code where `i18n` is needed
|