You are not logged in.

#1 2018-05-23 10:23:19

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

Locale and Spellcheck problems

I posted a similar query earlier, but it seems like there is some deeper problem in my configuration.

rep ~  $ locale
LANG=en_IN.US-ASCII
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
rep ~  $ cat /etc/locale.conf
LANG=en_IN.utf8
LC_TIME=en_IN.utf8

rep ~  $ localectl list-locales
en_IN
en_IN.utf8
en_US
en_US.iso88591
en_US.utf8
rep ~  $

I followed the steps on the Arch wiki to generate and set the locale, but after a reboot, the locale goes back to "en_IN.US-ASCII"


What gives?

Thanks in advance

Offline

#2 2018-05-23 11:37:29

sincomil
Member
Registered: 2018-02-13
Posts: 118

Re: Locale and Spellcheck problems

there is at least 2 locales:
* System-wide locale is defined in /etc/locale.conf
* User locale is defined in .config/locale.conf

In my case this files look like this:

$ cat  /etc/locale.conf
LANG=en_US.UTF-8

$ cat  .config/locale.conf
LANG=ru_RU.UTF-8

* Addition to make clear
All locales are enabled for generation in file /etc/locale.gen:

$ grep -v '^#.*' /etc/locale.gen
en_US.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8

And generated with locale-gen command

Last edited by sincomil (2018-05-23 11:46:03)

Offline

#3 2018-05-23 11:45:03

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

Re: Locale and Spellcheck problems

sincomil wrote:

there is at least 2 locales:
* System-wide locale is defined in /etc/locale.conf
* User locale is defined in .config/locale.conf

In my case this files look like this:

$ cat  /etc/locale.conf
LANG=en_US.UTF-8

$ cat  .config/locale.conf
LANG=ru_RU.UTF-8

I don't have any user specific locale settings.

rep ~  $ cat .config/locale.conf
cat: .config/locale.conf: No such file or directory
rep ~  $

Offline

#4 2018-05-23 11:48:16

sincomil
Member
Registered: 2018-02-13
Posts: 118

Re: Locale and Spellcheck problems

If you do not using user-specific locale then you are using system-wide, thats all. So you need to set system-wide locale to make it change for your user. But best practice is using English-based locale as system-wide and users native language locale as user-specific to make possible all GUI and TUI applications talk on users native language also  it accomodates displaying dates and currencies.

Last edited by sincomil (2018-05-23 11:53:52)

Offline

#5 2018-05-23 11:52:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Locale and Spellcheck problems

You environment might also be setting these, what are you starting? Which desktop/UI are you using?

Offline

#6 2018-05-23 12:14:36

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

Re: Locale and Spellcheck problems

I'm using KDE/Plasma 5

I cant find any place where that en_IN.US-ASCII could be coming from

Offline

#7 2018-05-23 12:22:32

sincomil
Member
Registered: 2018-02-13
Posts: 118

Re: Locale and Spellcheck problems

screenshot

Last edited by sincomil (2018-05-23 12:23:21)

Offline

#8 2018-05-23 12:26:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Locale and Spellcheck problems

So KDE's locale settings don't have anything that might point to this? FWIW run a

grep -R 'en_IN.US-ASCII' ~

  to dig through your home for that string (maybe expand that to /etc if you've adjusted something there).

Offline

#9 2018-05-23 12:50:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: Locale and Spellcheck problems

Why is your region "Default (C)"??

tr '\0' '\n' < /proc/`pidof systemd`/environ | grep LANG
tr '\0' '\n' < /proc/`pidof plasmashell`/environ | grep LANG
tr '\0' '\n' < /proc/$$/environ | grep LANG

Offline

#10 2018-05-23 12:58:48

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

Re: Locale and Spellcheck problems

I noticed that I had an LC_ALL="C" for whatever reason in my .bashrc - cant recall why I would ever have added that!

I removed that but

rep ~  $ tr '\0' '\n' < /proc/`pidof systemd`/environ | grep LANG
LANG=en_IN.utf8
rep ~  $ tr '\0' '\n' < /proc/`pidof plasmashell`/environ | grep LANG
LANG=en_IN.US-ASCII
LANGUAGE=en_US:en_GB
rep ~  $ tr '\0' '\n' < /proc/$$/environ | grep LANG

Looks like plasmashell is getting that from somewhere!

Offline

#11 2018-05-23 13:15:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Locale and Spellcheck problems

Check KDE's locale settings or the startup script settings and/or run my command it should uncover most/all relevant locations.

Offline

#12 2018-05-23 13:19:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: Locale and Spellcheck problems

Also "ps -o ppid -p `pidof plasmashell`" will print the PID of plasmas parenting process, you can walk up the tree to see whether plasma itself inherits this from somewhere.

Offline

Board footer

Powered by FluxBB