Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language days,tomorrow,today should follow User Profile language #349

Open
kaosmagix opened this issue Oct 24, 2022 · 9 comments
Open

Language days,tomorrow,today should follow User Profile language #349

kaosmagix opened this issue Oct 24, 2022 · 9 comments

Comments

@kaosmagix
Copy link

The language on days, tomorrow, today should be based on the language of the user settings. In this case I have my profile set to English and my spouse have it set to Dutch. Currently the labels follow the language of the config option dutch: true/false

@awolkers
Copy link

awolkers commented Nov 9, 2022

@kaosmagix funny, you've created two identical issues that I also wanted to address.

I think the output should indeed hook into the translations already availible in HA. This could be especially usefull for foreign people who are living in the Netherlands.

@pippyn
Copy link
Owner

pippyn commented Apr 17, 2023

Yes I really want this too! I haven't found any way to do this however.
If anybody could point me in the right direction I will implement this asap.

@awolkers
Copy link

@pippyn
Copy link
Owner

pippyn commented Apr 17, 2023

I'm aware of the docs. This will not use the translations already in HA

@awolkers
Copy link

Maybe check this one as an example on how to set it up:
https://github.com/pinkywafer/Anniversaries/tree/master/custom_components/anniversaries

Not sure if you can opt in on already defined translations but you can always write you own right? I can image that for your component a bare minimum of NL, EN and FR is sufficient since the focus is on Dutch and Belgian waste collectors only.

@pippyn
Copy link
Owner

pippyn commented Apr 17, 2023

Where do you want me to look? What I can see this sensor is only in English.

(only the config flow is translated as far as I can see)

@awolkers
Copy link

I'm not that familiar with Python but can imagine the same logic for using translations within the config flow applies to the place where you set the sensor values.

@sebmatton
Copy link

Hi there! I'm really interested by this feature as well. My family is french speaking and there is no way to translate to french...

Is there no easy way to set the entities as standard date values which can be supported by HA ?

@Friedrieck
Copy link

Some info here, I think: https://developers.home-assistant.io/docs/internationalization/core#state-of-entities
Inspiration can also be taken from here: https://github.com/olibos/HomeAssistant-RecycleApp (it does not translate the states or fractions, just get them passing the language parameter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants