refactor: add i18n composable
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
readonly,
|
readonly,
|
||||||
Ref,
|
Ref,
|
||||||
ref,
|
ref,
|
||||||
|
useContext,
|
||||||
watch,
|
watch,
|
||||||
wrapProperty,
|
wrapProperty,
|
||||||
} from "@nuxtjs/composition-api"
|
} from "@nuxtjs/composition-api"
|
||||||
@@ -132,3 +133,10 @@ export function useStreamSubscriber() {
|
|||||||
subscribeToStream: runAndSubscribe,
|
subscribeToStream: runAndSubscribe,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useI18n() {
|
||||||
|
const {
|
||||||
|
app: { i18n },
|
||||||
|
} = useContext()
|
||||||
|
return i18n.t.bind(i18n)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user