Fixed language switch problem

This commit is contained in:
Gunnar Skjold
2024-03-02 09:03:45 +01:00
parent 2bb5361b22
commit f4de3e6178
8 changed files with 24 additions and 16 deletions

View File

@@ -1174,6 +1174,7 @@ void AmsWebServer::translationsJson() {
lang = String(ui.language);
}
}
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("Sending translation file for language: %s\n"), lang.c_str());
snprintf_P(buf, BufferSize, PSTR("/translations-%s.json"), lang.c_str());
if(!LittleFS.exists(buf)) {
@@ -1181,6 +1182,7 @@ void AmsWebServer::translationsJson() {
notFound();
return;
}
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("Language file %s\n"), buf);
// server.sendHeader(HEADER_CACHE_CONTROL, CACHE_1DA);
server.sendHeader(HEADER_CACHE_CONTROL, CACHE_CONTROL_NO_CACHE);