xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
598 stars 49 forks source link

loadLanguageAsync seems to not be working for me #182

Closed travisricks closed 2 months ago

travisricks commented 2 months ago

I'm not sure if this is a bug or I'm using it incorrectly.

I have a business case where the app language needs to change based on a user action. I'm using the loadLanguageAsync method for this.

After calling the method, I can console.log and see the active language has been changed, but none of the text on the screen is updating.

Is this the correct usage?

methods: {
    async changeLanguage(newLang) {
      await loadLanguageAsync(newLang);
    },
  }
travisricks commented 2 months ago

This was my fault. I was using trans instead of wTrans and also in my resolve function, lang was not being passed.