vue-i18n-tools
v0.1.7
Published
Internationalization plugin for Vue.js
Downloads
3
Maintainers
Readme
vue-i18n-tools
Installation
npm install --save vue-i18n-tools
Getting Started
HTML
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-i18n/dist/vue-i18n.js"></script>
<div id="app">
<p>{{ $t("Hello World!") }}</p>
</div>
JavaScript
import VueI18nTools from 'vue-i18n-tools';
Vue.use(VueI18nTools);
const locales = {
sk: {
translations: {
'Hello World!': 'Ahoj Svet!'
}
},
de: {
translations: {
'Hello World!': 'Hallo Welt!'
}
}
};
const i18n = new VueI18nTools({
locale: 'sk',
locales
});
new Vue({
i18n
}).$mount('#app');
Todo
- custom resource load function to avoid polyfills for fetch
- docs
- server translate API
License
Copyright (c) 2018 Andrej Adamcik