mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 08:44:04 +00:00
Update src/mixins/lang.js
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
a483ea6a8f
commit
995b115d27
1 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,10 @@ export default {
|
||||||
localStorage.locale = lang;
|
localStorage.locale = lang;
|
||||||
setPageLocale();
|
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) {
|
async changeCurrentPageLang(lang) {
|
||||||
let message = (await langModules["../lang/" + lang + ".json"]()).default;
|
let message = (await langModules["../lang/" + lang + ".json"]()).default;
|
||||||
this.$i18n.setLocaleMessage(lang, message);
|
this.$i18n.setLocaleMessage(lang, message);
|
||||||
|
|
Loading…
Reference in a new issue