refactor: add i18n composable
This commit is contained in:
parent
680f61b7dc
commit
cad8f3e856
1 changed files with 8 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
readonly,
|
||||
Ref,
|
||||
ref,
|
||||
useContext,
|
||||
watch,
|
||||
wrapProperty,
|
||||
} from "@nuxtjs/composition-api"
|
||||
|
|
@ -132,3 +133,10 @@ export function useStreamSubscriber() {
|
|||
subscribeToStream: runAndSubscribe,
|
||||
}
|
||||
}
|
||||
|
||||
export function useI18n() {
|
||||
const {
|
||||
app: { i18n },
|
||||
} = useContext()
|
||||
return i18n.t.bind(i18n)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue