feat: enable Companion simulator to switch UI language at runtime (#6510)

This commit is contained in:
philmoz
2025-11-03 09:57:09 +10:00
committed by GitHub
parent 8f96ec079b
commit 1931514140
318 changed files with 269720 additions and 389341 deletions
+9
View File
@@ -645,12 +645,21 @@ void menuRadioSetup(event_t event)
case ITEM_RADIO_SETUP_LANGUAGE:
lcdDrawTextAlignedLeft(y, STR_VOICE_LANGUAGE);
#if !defined(ALL_LANGS)
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, currentLanguagePack->name, attr);
#else
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, currentLanguagePack->name(), attr);
#endif
if (attr) {
currentLanguagePackIdx = checkIncDec(event, currentLanguagePackIdx, 0, DIM(languagePacks)-2, EE_GENERAL);
if (checkIncDec_Ret) {
currentLanguagePack = languagePacks[currentLanguagePackIdx];
strncpy(g_eeGeneral.ttsLanguage, currentLanguagePack->id, 2);
#if defined(ALL_LANGS)
currentLangStrings = langStrings[currentLanguagePackIdx];
extern void setLanguageFont(int n);
setLanguageFont(currentLanguagePackIdx);
#endif
}
}
break;