Update src/mixins/lang.js

Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Wampie Driessen 2023-08-05 17:55:27 +02:00
parent a483ea6a8f
commit 995b115d27

View file

@ -34,7 +34,10 @@ export default {
localStorage.locale = lang;
setPageLocale();
},
/** Change the language for the current page (no localstore set) */
/**
* Change the language for the current page (no localstore set)
* @param {string} lang Code of language to switch to.
*/
async changeCurrentPageLang(lang) {
let message = (await langModules["../lang/" + lang + ".json"]()).default;
this.$i18n.setLocaleMessage(lang, message);