mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 16:33:28 +00:00
a736965e91
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
18 lines
No EOL
486 B
JavaScript
18 lines
No EOL
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)
|
|
}
|
|
}
|
|
} |