WebUIs: set the lang attribute based on the chosen language

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-05-24 18:23:41 +02:00
parent 8ecb47e65f
commit 0b49f1d88c
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -178,6 +178,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
};
const renderI18n = () => {
document.documentElement.setAttribute('lang', i18next.resolvedLanguage);
$('title').text('{{.Branding.Name}} - '+$.t('{{.Title}}'));
$('body').localize();
let select2elements = [].slice.call(document.querySelectorAll('[data-control="i18n-select2"]'));