Template Example: Weather Binding

This is relatively ugly but works, and since there’s not really a best practice… :slight_smile:

<div ng-init="daysnames={'Sunday': 'dimanche', 'Monday': 'lundi', 'Tuesday': 'mardi', and so on...}">
{{daysnames[(itemValue('Sunrise_Time') | date:'EEEE')]}}
</div>

…and in German your ng-init would be of course: daysnames={'Sunday': 'Sonntag', 'Monday': 'Montag', 'Tuesday': 'Dienstag', and so on...}".
You could also use a similar technique for month names.

2 Likes