P粉5508235772023-08-26 00:14:37
There may be other issues, but there is at least one bug in the code. i18n.global.locale
is a ref and should be used as follows:
const setLocale = (lang) => { i18n.global.locale.value = lang; };
It cannot be done in a reactive manner.