diff --git a/src/i18n.js b/src/i18n.js index 7e0a0abf5bccd5a7de060253c644054521157448..a40dc7d5792695792f0a8427fee209baff866747 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -19,6 +19,6 @@ function loadLocaleMessages () { export default new VueI18n({ - fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en', + fallbackLocale: 'nob', messages: loadLocaleMessages() }) diff --git a/src/main.js b/src/main.js index 8bc28e331f45b88c07f13d37161a3ce2938fdbda..d8a10d429c0e7e08f0a1590a98122ef41be7a48a 100644 --- a/src/main.js +++ b/src/main.js @@ -32,10 +32,11 @@ const store = new Vuex.Store({ state.showSearchToolbar = localStorage.getItem('showSearchToolbar') || false state.showHGNO = localStorage.getItem('showHGNO') || false state.showInflectionNo = localStorage.getItem('showInflectionNo') || false - state.currentLocale = localStorage.getItem('currentLocale') || {text:"nob", value: "nob"} + state.currentLocale = localStorage.getItem('currentLocale') || {text:"norsk (bokmål)", value: "nob"} }, - changeLocale(state, locale) { + changeLocale(state, locale, i18n) { state.currentLocale = locale + i18n.locale = locale localStorage.setItem("currentLocale", locale); }, toggle(state, setting) { diff --git a/vue.config.js b/vue.config.js index e06c46e70643be22d517f0737f2fd55537f25ba4..c730a95709dd54f21aeabe349a5367e21782f817 100644 --- a/vue.config.js +++ b/vue.config.js @@ -11,7 +11,7 @@ module.exports = { pluginOptions: { i18n: { - fallbackLocale: 'en', + fallbackLocale: 'nob', localeDir: 'locales', enableInSFC: true, includeLocales: false,