better modalCard, integrated i18n with vuejs-i18n and drupal's strings_i18n_json_export
remain to automaticly export jsons and updated json files with webpack and to understand how to access nested translations
This commit is contained in:
20
web/themes/custom/materiotheme/vuejs/i18n/index.js
Normal file
20
web/themes/custom/materiotheme/vuejs/i18n/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import * as en from './en.json'
|
||||
import * as fr from './fr.json'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
const messages = {
|
||||
en: {
|
||||
...en.default
|
||||
},
|
||||
fr: {
|
||||
...fr.default
|
||||
}
|
||||
}
|
||||
|
||||
export default new VueI18n({
|
||||
locale: 'en',
|
||||
messages
|
||||
})
|
Reference in New Issue
Block a user