VueJS plugin for translations
There's a new .tWithParams
/ .$translate.text(text, params)
method that supports dynamics keys to be passed to the text translation method.
Thanks to @glenngijsberts for the collaboration! 🤘
Now you can add a locales globally when loading the plugin with Vue.locales(locales
)
Also, there are new events emitted:
Emit an event when the language is changed.
This can be listened by the component with
this.$on('translate:language', lang => {
...
});
This fixes major bug when used with Laravel Elixir to make a production build (with the --production flag)
Vue 1 is now supported too
A bug in the example is now fixed, some pending 'translate' directive were added to the example.