dkfbasel / vuex-i18n

Localization plugin for vue.js 2.0 using vuex as store
MIT License
665 stars 56 forks source link

Get fallback locale method? #70

Closed simmons-kyle closed 6 years ago

simmons-kyle commented 6 years ago

Is there a method available to retrieve the current fallback locale?

I can see we have fallback() as a method which calls the internal setFallbackLocale method but nothing exposed to get the fallback.

tikiatua commented 6 years ago

Hi @simmons-kyle

Thank you for your question. All the plugin information is essentially stored in a vuex module (i18n by default). You can easily read out the current fallback locale using this.$store.state.i18n.fallback.

simmons-kyle commented 6 years ago

Great stuff, thanks for clarifying!