- client: Make language tag in HTML same as setting language

Close 

Squashed commit of the following:

commit b822a83cb05cc5ba92000cdb7d1c12629471bc57
Merge: e2fa24fb 72ce5f57
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri Jul 3 11:02:56 2020 +0300

    Merge branch 'master' into fix/1797

commit e2fa24fb9fa0c15f8411e186e90e0ffb1c705fb2
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Jul 2 18:21:30 2020 +0300

    Extract helper

commit ba8473e7b16ab8b1abbee4b42a4ef2b0de8c136b
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Jul 2 15:31:42 2020 +0300

    - client: Make language tag in HTML same as setting language
This commit is contained in:
Artem Baskal 2020-07-03 11:14:54 +03:00
parent 72ce5f57c1
commit 205680b71b
5 changed files with 106 additions and 75 deletions
client/src/helpers

View file

@ -588,3 +588,10 @@ export const formatElapsedMs = (elapsedMs, t) => {
.toFixed(2);
return `${formattedElapsedMs} ${t('milliseconds_abbreviation')}`;
};
/**
* @param language {string}
*/
export const setHtmlLangAttr = (language) => {
window.document.documentElement.lang = language;
};