update html lang on locale change in settings

This commit is contained in:
KDSBrowne 2021-04-20 11:51:15 +00:00
parent ef337acbe6
commit ca3975f242

View File

@ -240,6 +240,7 @@ class Settings extends Component {
confirm={{
callback: () => {
this.updateSettings(current, intl.formatMessage(intlMessages.savedAlertLabel));
document.getElementsByTagName('html')[0].lang = current.application.locale;
/* We need to use mountModal(null) here to prevent submenu state updates,
* from re-opening the modal.
*/
@ -251,6 +252,7 @@ class Settings extends Component {
dismiss={{
callback: () => {
Settings.setHtmlFontSize(saved.application.fontSize);
document.getElementsByTagName('html')[0].lang = saved.application.locale;
mountModal(null);
},
label: intl.formatMessage(intlMessages.CancelLabel),