1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 05:37:52 +03:00
This commit is contained in:
Anton Afanasyeu
2026-06-09 13:38:09 +02:00
parent df79962dee
commit 507924229d
22 changed files with 609 additions and 246 deletions

View File

@@ -52,11 +52,18 @@
var key = el.getAttribute('data-i18n-title');
if (key) el.setAttribute('title', t(key));
});
var flag = document.getElementById('locale-flag');
var code = document.getElementById('locale-code');
var disp = LANG_DISPLAY[lang] || LANG_DISPLAY.en;
if (flag) flag.textContent = disp.flag;
if (code) code.textContent = disp.code;
document.querySelectorAll('.locale-flag').forEach(function (el) {
el.textContent = disp.flag;
});
document.querySelectorAll('.lang-select').forEach(function (sel) {
SUPPORTED.forEach(function (code) {
var meta = LANG_DISPLAY[code] || LANG_DISPLAY.en;
var opt = sel.querySelector('option[value="' + code + '"]');
if (opt) opt.textContent = meta.flag + ' ' + meta.code;
});
sel.value = lang;
});
document.documentElement.setAttribute('lang', lang);
var footerLeft = document.querySelector('.platform-footer__left[data-i18n]');
if (footerLeft) {