Display MoreDisplay Moretry to explain it to me as if I were 5 years old ... I don't understand well .. also because .. I don't know Chinese .. I speak Italian at times and google translates English badly too .. I could understand garlic for onion ..
Cry.
right. I was just telling you that I didn't understand what you meant.. if you can explain better in detail
Thanks a lot!
È molto semplice: quando si seleziona MSN Weather nelle impostazioni di sistema cinesi, non è possibile caricare l'icona del tempo e i dettagli meteo.
It's very simple, that is, when you select MSN Weather when the system is set in Chinese, it can't load the weather icon and weather details.
API requests are sent with the system language code:
language = config.osd.language.value.replace('_', '-').lower()
For Chinese, this might result in:
zh-cn (Simplified Chinese)
zh-tw (Traditional Chinese)
zh-hk (Hong Kong Chinese)
you could also try to add a mapping for some unsupported languages, but it also depends on the server you choose: msn, openmeteo etc.
CodeDisplay Moredef get_api_language(lang_code): lang_map = { "zh-cn": "zh_cn", "zh-tw": "zh_tw", "zh-hk": "zh_tw", "zh": "zh_cn" } service = config.plugins.OAWeather.weatherservice.value # Gestione speciale per Open-Meteo if service == "OpenMeteo" and lang_code.startswith("zh"): return "zh" # Open-Meteo usa solo "zh" return lang_map.get(lang_code, lang_code) Use with--------------------- language = get_api_language(config.osd.language.value.replace('_', '-').lower())
or API Response encoding issue
Chinese responses may have encoding issues.
Coderesponse = requests.get(url, headers=headers) response.encoding = 'utf-8' data = response.json()
and forced.. maybe..
or using city IDs instead of names: Chinese city names may not be recognized correctly by the services.
Try to do a test: set the language to English on the box, reboot and check if the icons are visible.
The choice of English is perfect!
1_0_1_5C2D_CB0_B2CE_0_0_0_0_20250705210347.jpg1_0_1_5C2D_CB0_B2CE_0_0_0_0_20250705210418.jpg1_0_1_5C2D_CB0_B2CE_0_0_0_0_20250705210406.jpg
Selecting the English one is perfect, then switching to Chinese, the weather icon disappears...
