trying to implement vue-i18n in a component with composition api.
I want to be able to set some translation messages inside of the onMounted hook. In the options api, I would use this.$i18n.setLocaleMessage(locale, messages).
However, this is unavailable within the composition apis Setup() method. So it gives me undefined when I try the above. I can do it by importing i18n into the component:
import { useI18n } from 'vue-i18n' and then make an instance of it var i18n = useI18n({}), i18n.setLocaleMessage(), but I would rather prefer the one line solution like the first one.