shannonhochkins / ha-component-kit

A Home Assistant React component library to generate dashboards with ease, This utilizises a massive list of Components / cards to use out of the box, a large range of hooks to build your own custom functionality, and a hell of a lot more! It's using web sockets to retrieve information from your home assistant instance so there's 0 latency!
https://shannonhochkins.github.io/ha-component-kit/
329 stars 21 forks source link

Multi lingal #135

Open shannonhochkins opened 3 weeks ago

shannonhochkins commented 3 weeks ago

There's been a request to ensure we can support multiple languages, I've done some initial experimentation and all looks possible to retrieve translations from homeassistant over websockets which means this will be a relatively easy (but time consuming) feature to add!

Ideas, multiple hooks to retrieve translations, localise functions as well as the ability to fetch more translations by category.

shannonhochkins commented 3 weeks ago

Roadblock - There's a websocket hook called frontend/get_translations, however this doesn't return everything, for some reason the front-end requests translations through this hook as well as a file, in a structure like: http://homeassistant.local:8123/static/translations/en-[hash].json and currently there's no way to retrieve the has name dynamically to fetch it.

I've created a discussion ticket - https://github.com/home-assistant/frontend/discussions/20760