Html layout of weather binding

Hi,
I designed a layout from weather binding which looks like

How can I translate the values Mostly Cloudy and (equal).

The items are mapped

String   CommonId         "[MAP(weather_de.map):%s]"        {weather="locationId=in, type=condition, property=commonId"}

but in the layout there is no reference to the item, but

 <tr>
     <td colspan="2">${weather:condition.text}</td>
 </tr>

BTW, I’m speaking about weather-binding V1.8.

Unfortunately, in this new binding it is not possible to reference to regular items :frowning:
Regards,
Michael

Shouldn’t you be able to add these (Mostly Sunny) to your map file and map to translate them? I don’t use the weather binding but I believe that’s how it works.

Hi,
thanks for your hint, but I have those translations in my weather_de.map. It seems, that weather binding doesn’t consider this.
Regards,
Michael

Hi,

are your .map file entries in this format?
Waxing\u0020Crescent=zunehmender Halbmond

Please note, that the Unicode “space” is replaced by \u0020 otherwise the mapping will not work.

2 Likes

YESSSS - Thank you sooo much! that helped!

Mostly\u0020Cloudy=meist Bewölkt
Rain\u0020and\u0020Snow=Regen & Schnee

This works in OH 2.1

I am glad to help.
Usually it’s the other way around :wink:

if you would like to have the already translated texts from the weather provider (most do have that Option), be sure, you configure the binding with the language:

location.<locationId>.language

with wunderground there’s some difference, because the language codes don’t reflect the ISO-norm, therefore german language would be “DL” and not “DE”, that’s what didn’t work in my weather.cfg at first, which i took from the documentation (it says “(see provider homepage for supported languages)” - but…)
so for german language and wunderground returning those bits, it would be:

apikey.Wunderground=xxxx

# location configuration, you can specify multiple locations
location.home.name=daheim
location.home.latitude=46.23
location.home.longitude=12.23
location.home.provider=wunderground
location.home.language=DL
location.home.updateInterval=15
location.home.units=si

note: at least with wunderground API, the language is case-sensitive!

other languages from wunderground API can be seen here:
http://api.wunderground.com/weather/api/d/docs?d=resources/country-to-iso-matching

after that, you’ll get german language (and metric units) from the weather binding.