refactor: add i18n composable
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user