Closed arthurvasconcelos closed 6 years ago
Hi @arthurvasconcelos,
Thank you for your feedback. I added the method as $i18n.locales() in the version 1.10.5. An example is given in the test repository.
Please keep in mind that this is a method that will be invoked on every render cycle. To make use of vue's caching system I would recommend to create a getter method or computed property like this.
locales() {
return Object.keys(this.$store.state.i18n.translations);
}
The translate method ($t) is also run in every render cycle, not sure if we can find a better solution in the future that will make use of the caching functionality.
Thanks @tikiatua! Great lib you have here!
This is more a suggestion/request than a issue.
Would be nice to have a method that allow me to get all available locales.