Fixed loading ep_font_color3

This commit is contained in:
SamTV12345 2024-07-17 20:24:16 +02:00
parent ccbbaa20b3
commit b0a93ccddb
7 changed files with 20 additions and 19 deletions

View file

@ -1,18 +1,18 @@
import html10n from '../js/vendors/html10n';
((document) => {
// Set language for l10n
let regexpLang: string | undefined;
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
if (language) regexpLang = language[1];
// Set language for l10n
let regexpLang: string | undefined;
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
if (language) regexpLang = language[1];
html10n.mt.bind('indexed', () => {
html10n.localize([regexpLang, navigator.language, 'en']);
});
html10n.mt.bind('indexed', () => {
console.log('Navigator language', navigator.language)
console.log('Localizing things', [regexpLang, navigator.language, 'en'])
html10n.localize([regexpLang, navigator.language, 'en']);
});
html10n.mt.bind('localized', () => {
document.documentElement.lang = html10n.getLanguage()!;
document.documentElement.dir = html10n.getDirection()!;
});
})(document);
html10n.mt.bind('localized', () => {
document.documentElement.lang = html10n.getLanguage()!;
document.documentElement.dir = html10n.getDirection()!;
});