Skip to content

New method $i18n.locales, i18n.locales

Compare
Choose a tag to compare
@tikiatua tikiatua released this 26 Jan 08:45
· 63 commits to master since this release

As per request #66 we added a method to fetch all current locales. 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);
}