Page 1 of 1

Equivalent of dpkg reconfigure locales?

Posted: Wed Jan 18, 2017 11:35 pm
by Martin Frezman
I have an alias (script) that depends on setting LANG=en_US.
The alias works fine on a properly configured system.

I recently setup a Raspbian system and the alias didn't work, until I did "dpkg reconfigure locales" - and made sure that en_US was properly installed.

Now, on Arch, it is failing in the same way, and I think it is due to not having the en_US locale setup correctly. So, how to fix?

Re: Equivalent of dpkg reconfigure locales?

Posted: Thu Jan 19, 2017 9:58 am
by pepedog

Re: Equivalent of dpkg reconfigure locales?

Posted: Thu Jan 19, 2017 11:51 am
by Martin Frezman
TYVM.

For the impatient, it boils down to:

$ sudo vim /etc/locale.gen
(uncomment every line containing en_US)
$ sudo locale-gen
$ Now, alias/script works!

Note that locale-gen is a script, so it is examinable, but it recognizes no arguments (e.g., --help doesn't work as expected). Still, all good!