opus
(Jürgen Baginski)
January 10, 2017, 7:07pm
1
I’m trying to display a dayname on a webview using my local language, however I get the day only in english??
My codde-line (sing a channel of the weather binding) in the HTML is:
${forecast(1):condition.observationTime(%1$tA)}
My raspi is set to “de_DE.UTF-8 UTF-8”
Are you sure that this applies also to root
and openhab
user?
opus
(Jürgen Baginski)
January 11, 2017, 6:51am
3
??
I didn’t even know that this is user dependant!
Will check that, thanks for that input.
pensionado
(Gerard Dirkse)
January 11, 2017, 7:06am
4
I had a similar problem in openhab 1.x, I fixed it with setting this in /etc/default/openhab:
Extra arguments passed to Java
JAVA_ARGS=’-Duser.language=nl -Duser.country=NL’
Don’t know if this also applies to openhab 2
1 Like
opus
(Jürgen Baginski)
January 11, 2017, 8:09am
5
I did set de_DE.UTF-8 UTF-8 using “sudo raspi-config”. IMHO that way the setting is used by all users.
opus
(Jürgen Baginski)
January 11, 2017, 8:21pm
6
Thanks @pensionado , that change made it work (with the change to my language )!
Yes, this is definitely user dependend. Even if you have setup through sudo raspi-config, this would surely be done for pi and future users, but I’m quite sure, not for any other existing user. you could set the locales before starting openHAB using this line:
export LC_ALL=de_DE.UTF-8
in the start script.
opus
(Jürgen Baginski)
November 22, 2017, 6:32pm
8
I have to revive this old thread of mine:
I observed that the localisation of the daynames isn’t working anymore (since when???).
I applied both above methods, however the outcome doesn’t change!
Did you setup the language through Paper UI or runtime.cfg yet? There are options for that part…
opus
(Jürgen Baginski)
November 23, 2017, 4:41am
10
I have set the region to language de country DE in PaperUI.
I see the problem on Webpage which I convert to a picture before showing it on the sitemap, maybe the problem is due to that.
opus
(Jürgen Baginski)
November 24, 2017, 10:50am
11
Can’t even get a Text Item to show the localised name.
Text item=ObservationWeekDay1 label="[%1$tA]"
The item is defined as a DateTime!
Does show “Saturday” instead of the desired ""Samstag "
Please try to get the local settings for the user openhab:
sudo su -s /bind/bash openhab
Should open a bash for user openhab, even if the bash is set to /bin/false
.
Now take a look at locale
Another thing would be to take a look at /etc/default/locale
,
this is mine:
# File generated by update-locale
LC_ALL=de_DE.UTF-8
LANG=de_DE.UTF-8
In fact, I did an edit on this file but openhab gives me german Weekdays all the time (now OH2.2 #1088 )
1 Like
opus
(Jürgen Baginski)
November 24, 2017, 12:20pm
13
On the bash, I got an “no such file”.
I changed the other file and it is working now. Thanks again.
Reading the comment on your file,I might have missed to change the locale on the system.
RalphMW
(Ralph Müller-Welt)
October 28, 2018, 7:28pm
14
I can confirm, that setting locale with openhabian-config does not work!
openHAB 2.3.0-1 (Release Build)
Editing /etc/default/locale by hand and reboot sets everything correct.
Please report this issue on github https://github.com/openhab/openhabian
There is an old issue which is marked as solved https://github.com/openhab/openhabian/issues/59