-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Feature Request] Translation or custom "value" #17
Comments
@mhoogenbosch Nice, would be good to have! Do you already use dutch as your language in HA, so we can use that, or were you thinking more along the lines of a configuration value where you have to specify it yourself? |
I think it makes sense to comply with the default language of ha indeed. Using Dutch as primary language for ha. |
@mhoogenbosch PR is ready! Found a few caveats, the language that is used is the language that is set on your homeassistant instance. I first wanted it to reflect the language that a logged in user can set in their profile, but that doesn't make sense since you can have multiple users with multiple languages, but the sensors are always the same. In the case of for instance push notifications we don't have a user context, and thus it is the instance language that has to decide the values. I guess most users don't change language that often, so I didn't add any event listener to automatically update language upon changes. If you do change the language (from http://localhost:8123/config/general or configuration.yaml) you have to restart HA for the changes to take effect. |
Another caveat is that, since state is always number of days left, if you list these with auto-entities you will get "0 dagen" if the birthday is today. This can be changed if you use a custom attribute instead (the
Of course than the UI will have to look at this attribute instead of the state, but just wanted to show that it is possible. |
I live in the Netherlands, and use the birthdays for showing the kids how long it takes before their birthday is. Now it is only possible to have xx 'days', it would be really nice if it translates to Dutch 'dagen' and 'dag' for 1.
Another approach could be to be able to alter the 'days' to anything you'd like.
The text was updated successfully, but these errors were encountered: