debianize-mobilizon/js/config/styleguide.root.js
Thomas Citharel a736965e91
Add basic styleguide
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-10-07 10:25:21 +02:00

18 lines
486 B
JavaScript

import VueI18n from 'vue-i18n'
import messages from '@/i18n/index';
const language = (window.navigator).userLanguage || window.navigator.language;
const i18n = new VueI18n({
locale: language.replace('-', '_'), // set locale
messages, // set locale messages
});
export default previewComponent => {
// https://vuejs.org/v2/guide/render-function.html
return {
i18n,
render(createElement) {
return createElement(previewComponent)
}
}
}