mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-12-18 07:21:56 +03:00
Forgot to set lang attr on html
This commit is contained in:
parent
acba051ca2
commit
1a3751ff16
1 changed files with 2 additions and 0 deletions
|
@ -17,6 +17,8 @@ i18n.load(DEFAULT_LANG, messages);
|
|||
i18n.on('change', () => {
|
||||
const lang = i18n.locale;
|
||||
if (lang) {
|
||||
// lang
|
||||
document.documentElement.lang = lang;
|
||||
// LTR or RTL
|
||||
const { direction } = new Locale(lang).textInfo;
|
||||
document.documentElement.dir = direction;
|
||||
|
|
Loading…
Reference in a new issue