Replies: 1 comment 1 reply
-
partial answer...
But when another npm package does:
Then the original is called and not the customTranslate |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to overwrite the t function in my app.js to record missing translations.
In the past (vue2) i created a
Vue.prototype.$t = function (...args) {}
that did the checking and finally called the i18n.t() to return some valueHowever I have no clue how to do this in vue3
The most I am struggeling how do I catch a call like
import { useI18n } from "vue-i18n"; const { t } = useI18n(); t('hello')
and redirect it to a function function and return the result of the translation
mytranslate(...args) { return i18n.t(args) }
When this is working I can record the missing translations etc.
Any suggestions are highly appreciated
Beta Was this translation helpful? Give feedback.
All reactions