Releases: dkfbasel/vuex-i18n
Add function to check if a translation key exists
In response to the request #22, we added a function to check if a given key exists in the store.
Please note, that we also introduced the method i18n.localeExists that will return the same information as i18n.exists. In future versions, we will phase out i18n.exists to provide a cleaner api to the module
Performance improvements
A closure is used to initialize the render function, to avoid recompilation of the regular expression used to match variable substitutions on every rendering cycle.
Custom identifiers for variable substitution
This release introduces custom identifiers for variable substitutions. The identifiers to be used must be specified when the plugin is initialized. Start and end tags should be specified. Please be aware, that a regular expression is used to find the tags and respective escape characters should be used.
// initialize the vuexi18nPlugin
Vue.use(vuexI18n.plugin, store, 'i18n', ['{{', '}}']);
Bugfix: Update of locale translations
Updates of existing locale translations should now correctly trigger the vue observers to rerender the respective components.
Simplify initialization
This release simplifies the initialization of the plugin.
// previous initialization
const store = new Vuex.Store({
modules: {
i18n: vuexI18n.store
}
});
// new initialization
const store = new Vuex.Store();