0
So I have tried all things that I could Google up but still locale settings aren't changed (kind of, you will see what I mean).
To start off desired locale (lv_LV.UTF-8) is available on the system:
$ locale -a
C
C.UTF-8
en_US.utf8
lv_LV.utf8
POSIX
I have tried to set locale with sudo update-locale lv_LV.UTF-8
Also tried to set manually in /etc/default/locale
and /etc/environment
with no luck:
LANG=lv_LV.UTF-8
LC_MESSAGES=POSIX
If i check what locale is set then I get:
$ locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES=POSIX
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
So what DOES actually work is that I get Latvian text in Gnome calendar and see entry in Region and Language settings "Latvia". But if I try running Libre Calc then it recognizes dot as decimal separator instead of coma (which is set in Latvian locales).
So what else I can/should do to fully enable Latvian locales in Debian? Basically I need this because when I make inserts to database from PHP project it blames that e.g. '1,25' is invalid number and it should be '1.25' but on production server it accepts vice-versa: should be '1,25' and not '1.25'.
Thank you very much for such descriptive answer. You indeed lead me to correct thought that it is somewhere overridden (although I didn't find where it is) and I ended up editing
~/.bashrc
with this:export LC_ALL=lv_LV.UTF-8
and now when I write$ locale
it shows correct one. About PHP part - yes, users locale shouldn't (and it isn't) affect communication with DB. And actually I had another problem with it but that's a new story. Thanks for your help! – Sergey Zubov – 2015-04-26T11:21:34.550