diff --git a/index.html b/index.html index 6a5cfddce..d7681ca2d 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + diff --git a/js/localization.js b/js/localization.js index 44ed31556..f61b9fc4a 100644 --- a/js/localization.js +++ b/js/localization.js @@ -173,6 +173,11 @@ i18n.localize = function (reTranslate = false) { const element = $(this); element.attr('placeholder', translate(element.attr('i18n_placeholder'))); }); + + $('[i18n_lang]').each(function() { + const element = $(this); + element.attr('lang', translate(element.attr('i18n_lang'))); + }); } else { $('[i18n]:not(.i18n-replaced)').each(function() { @@ -234,6 +239,13 @@ i18n.localize = function (reTranslate = false) { element.attr('placeholder', translate(element.attr('i18n_placeholder'))); element.addClass('i18n_placeholder-replaced'); }); + + $('[i18n_lang]:not(.i18n_lang-replaced)').each(function() { + const element = $(this); + element.attr('lang', translate(element.attr('i18n_lang'))); + element.addClass('i18n_lang-replaced'); + }); + } return localized; diff --git a/locale/en/messages.json b/locale/en/messages.json index 14e5066f6..0dbe2f22d 100644 --- a/locale/en/messages.json +++ b/locale/en/messages.json @@ -6156,5 +6156,8 @@ }, "adsbHeartbeatTotalMessages": { "message": "Heartbeat msgs" + }, + "currentLanguage": { + "message": "en" } } diff --git a/locale/uk/messages.json b/locale/uk/messages.json index 908b22d09..6beb3b238 100644 --- a/locale/uk/messages.json +++ b/locale/uk/messages.json @@ -6122,5 +6122,8 @@ }, "adsbHeartbeatTotalMessages": { "message": "Повід. сигналів перевірки" + }, + "currentLanguage": { + "message": "uk" } } diff --git a/locale/zh_CN/messages.json b/locale/zh_CN/messages.json index 49debeeb2..9b2f7b4b2 100644 --- a/locale/zh_CN/messages.json +++ b/locale/zh_CN/messages.json @@ -6156,5 +6156,8 @@ }, "adsbHeartbeatTotalMessages": { "message": "心跳消息" + }, + "currentLanguage": { + "message": "zh-CN" } } diff --git a/src/css/main.css b/src/css/main.css index 6a011d8eb..9dec4129e 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -2332,4 +2332,8 @@ ol li { .bold { font-weight: bold; -} \ No newline at end of file +} + +*:lang(ja) { + font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif; +}