mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-23 06:38:40 +02:00
Added vue-gettext.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import Vue from 'vue'
|
||||
import GetTextPlugin from 'vue-gettext'
|
||||
import translations from '@/translations.json'
|
||||
|
||||
Vue.use(GetTextPlugin, {
|
||||
availableLanguages: {
|
||||
en: 'English',
|
||||
fr: 'Français'
|
||||
},
|
||||
translations: translations
|
||||
})
|
||||
|
||||
Vue.filter('translate', value => {
|
||||
return !value ? '' : Vue.prototype.$gettext(value.toString())
|
||||
})
|
||||
Reference in New Issue
Block a user