Skip to content

Commit

Permalink
WebUIs: set the lang attribute based on the chosen language
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
  • Loading branch information
drakkan committed May 24, 2024
1 parent 8ecb47e commit 0b49f1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions templates/common/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
};

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"]'));
Expand Down

0 comments on commit 0b49f1d

Please sign in to comment.