You are not logged in.
When i installed Arch Linux i put the language on french (fr_FR.UTF-8 UTF-8)
but i wanted to change language to american english, so i changed /etc/locale.gen and uncommented en_US.UTF-8 UTF-8 (and recommented fr_FR.UTF-8 UTF-8)
but (sudo)locale-gen shows me :
$ sudo locale-gen
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (fr_FR.UTF-8)
Generating locales...
en_US.UTF-8... done
Generation complete.
and when i reboot, the language is in french.
locale :
$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
locale -a :
$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US.utf8
When i
export LC_ALL="en_US.UTF-8"
locale shows me :
$ locale
LANG=fr_FR.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
but when i try to
source ~/.bashrc
it gives me :
$ source ~/.bashrc
bash: avertissement :setlocale : LC_ALL : impossible de changer le paramètre de langue (fr_FR.UTF-8)
which in english means :
$ source ~/.bashrc
bash: warning :setlocale: LC_ALL : cannot change locale (fr_FR.UTF-8)
Please Help
Last edited by I4MTRUE (2018-02-23 16:39:08)
Offline
locale.gen and locale-gen just generates them. You need to change /etc/locale and anywhere else you have the LANG variable set.
Last edited by Scimmia (2018-02-23 16:11:29)
Offline
what do i put in /etc/locale and the others ?
Offline
Offline
i did setup locale.gen and locale.conf and rebooted but it still don't work
Last edited by I4MTRUE (2018-02-23 16:18:34)
Offline
cat /etc/locale.conf
localectl
locale
locale -a
Edit: w/o local environment changes, of course. Also do not try to edit the locale in your bashrc - this has no impact on eg. your desktop shell.
Last edited by seth (2018-02-23 16:22:22)
Offline
cat /etc/locale.conf gives me :
$ cat /etc/locale.conf
LANG="en_US.UTF-8"
LANGUAGE="en_US"
LC_COLLATE="C"
LC_ALL="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
localectl gives me :
$ localectl
System Locale: LANG=en_US.UTF-8
LANGUAGE=en_US
LC_COLLATE=C
VC Keymap: fr
X11 Layout: n/a
locale gives me :
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
and locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US.utf8
Last edited by I4MTRUE (2018-02-23 16:26:07)
Offline
So something™ which is not your /etc/locale.conf sets your LC_* vars to fr_FR.UTF-8.
Did you log out/in after making those changes?
If yes, this is either in your ~/.profile, your ~/.bashrc or ~/.bash_profile or something your desktop session (which?) does. (Check it's settings GUI)
Offline
i think i got it, in bashrc there is :
...
#Locales
export LANGUAGE=fr_FR.UTF-8
export LANG=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8
...
should i remove them ? or remplace them by en_US.UTF-8
Last edited by I4MTRUE (2018-02-23 16:31:03)
Offline
From what I'm getting they want everything to be fr_FR.UTF-8
However there's every evidence that the entry hasn't been uncommented properly in /etc/locale-gen recheck that file.
Whoops, totally misread, disregard.
But yes, remove them.
Last edited by V1del (2018-02-23 16:32:51)
Offline
ah ok
Last edited by I4MTRUE (2018-02-23 16:32:51)
Offline
"Remove" - bashrc is no good place to control your profile (unless you want to alter it for interactive bash and interactive bash only - what's rather unlikely; you want to alter it for your entire session or a specific shell context)
Offline
so i changed bashrc and restarted my computer and locale is set to english
Thanks for the help
Offline