-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Thank you for this excellent media player card!
I'm reporting a bug regarding the localization of the card. Currently, automatic language detection does not work, and the card defaults to English even when the Home Assistant user profile is set to another language (like French).
After investigating the code, I found that the localize function (minified as h) only checks localStorage, which is often empty or not synced with Home Assistant's global settings.
Current broken logic:
const a = (localStorage.getItem("selectedLanguage") || "en")
Proposed fix to restore automatic localization:
const a = (localStorage.getItem("selectedLanguage") || document.querySelector("home-assistant").hass.language || "en")
By adding the document.querySelector("home-assistant").hass.language check, the card will finally respect the user's language choice in Home Assistant settings.
Thank you for this great project, hoping to see this fix in the next update!