Weather forecast webview format

All,

I am using the weather webview and I like it so far:
A part of the html code looks like this:

	<table id="weather-forecast-table">
		<tr>
			<td>Heute</td>
			<td>${forecast(1):condition.observationTime(%1$tA)}</td>
			<td>${forecast(2):condition.observationTime(%1$tA)}</td>
			<td>${forecast(3):condition.observationTime(%1$tA)}</td>
			<td>${forecast(4):condition.observationTime(%1$tA)}</td>
		</tr>
		<tr>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(0):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(1):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(2):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(3):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(4):condition.commonId}.png"/></td>
		</tr>

And it looks like this:

However, I would like to change “Sunday” to the German “Sonntag” or even better to “So”.
Anyone who achieved this already?

I guess you are using Linux? You have to change LANG to de_DE.utf8 at least for the openhab user.

yes, good guess!
I am using Jessie.
Thanks - I’ll give it a try!

It works!
You’re my man!
I struggled with the Wunderground API to switch to German - didn’t work…

One more questioon :slight_smile:
Do you knoow if it’s possible to use the short weekday names:
Mo Di Mi Do …

Thanks in advance!

I did not test this yet, but try (%1$ta) instead of (%1$tA)
(For further information, take a look at http://www.java2s.com/Tutorials/Java/Java_Format/0120__Java_Format_Dates_Times.htm)

Yes, great!
That did the trick.
Thanks a lot.

The only annoying thing is, that I needed to change it in the layout html file in the two locations:
/etc/openhab2/html/weather-data/layouts/
and
/var/lib/openhab2/webapps/weather-data/layouts/

I still did not figure out why both files need to be present for webviews…

I did a symlink to avoid a duplicate file.

Good Point :wink:
Thanks