0

i got a little Problem, i'm creating a vuejs package in which i use vue-i18n to translate things.

The Problem is, if the user haven't got vue-i18n installed it breaks the package (obviously since i use it).

Do you know a way to prevent this?

My first approach was to just v-if the translations in the template to check if i18n is registered within window, but that obviously won't work if a user names the object differently.

ExCluSiv3
  • 98
  • 1
  • 7

1 Answers1

0

you can check if this.$i18n exists

John
  • 1,081
  • 1
  • 9
  • 34