Changing LC_TIME

Technical issues/questions of an intermediate or advanced nature.
User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Changing LC_TIME

Post#1 by Rava » 10 Feb 2019, 13:01

I try to set interlink Interlink gtk2 (email and news client, slim Mozilla Thunderbird fork) or Interlink V6953 gtk2 (email and news client, slim Mozilla Thunderbird fork) to have 24 hrs time format instead of am/pm.

In the support chat the developer of Interlink told me that interlink uses the system defaults for the date display, and that I have to set up the date locale in my system..

So, I need to change that or apply a hack via a script that starts interlink. This is adopted by an article about Thunderbird ( http://kb.mozillazine.org/Date_display_format )

Code: Select all

#!/bin/sh
export LC_TIME=de_DE.utf8
[ "$LC_ALL" != "$LC_TIME" ] && unset LC_ALL # only necessary if set to something different from LC_TIME
exec /opt/interlink/interlink "$@"
But sure, seems de_DE.utf8 needs to be installed, and for some reason that is not that trivial on Slackware.

For now I only get this error message when trying to load interlink via that script;

Code: Select all

/usr/local/bin/interlink_de_DE.utf9: line 2: warning: setlocale: LC_TIME: cannot change locale (de_DE.utf8): No such file or directory

(interlink:24112): Gtk-WARNING **: 13:51:07.977: Locale not supported by C library.
	Using the fallback 'C' locale.
Testing which de locales are installed via

Code: Select all

locale -a | egrep "de"
results in no result, aka no locale for de installed.

How do I install de_DE.utf8?
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2067
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Changing LC_TIME

Post#2 by donald » 10 Feb 2019, 14:05

http://dl.porteus.org/x86_64/Porteus-v4.0/language/

lsxzm de-core_locales.xzm
......
/usr/lib/locale/de_DE.utf8
......

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Re: Changing LC_TIME

Post#3 by Rava » 10 Feb 2019, 14:47

donald, see also my PM on the subject.

Created a test script

Code: Select all

#!/bin/sh
export LC_TIME=de_DE.utf8
[ "$LC_ALL" != "$LC_TIME" ] && unset LC_ALL # only necessary if set to something different from LC_TIME
echo dummy ...
activated de-core_locales.xzm :

Code: Select all

# ls /usr/lib/locale/de_DE.utf8
LC_ADDRESS  LC_IDENTIFICATION  LC_MONETARY  LC_PAPER
LC_COLLATE  LC_MEASUREMENT     LC_NAME      LC_TELEPHONE
LC_CTYPE    LC_MESSAGES        LC_NUMERIC   LC_TIME
Run test script:

Code: Select all

guest@porteus:~$ interlink-test-locale 
/usr/local/bin/interlink-test-locale: line 2: warning: setlocale: LC_TIME: cannot change locale (de_DE.utf8): No such file or directory
dummy ...
Do I need to reboot?
Does it have to be set via /etc/profile.d/lang.sh ?
Cheers!
Yours Rava

Post Reply