Eu tenho um servidor RPi do qual quero alterar seu idioma para francês. Eu tentei o seguinte:
Definindo locale-gen
admin@Gildurklaus:~$ grep fr_FR.UTF-8 /usr/share/i18n/SUPPORTED
fr_FR.UTF-8 UTF-8
admin@Gildurklaus:~$ sudo sed -i 's/^# *\(fr_FR.UTF-8\)//' /etc/locale.gen && sudo locale-gen
Generating locales (this might take a while)...
fr_FR.UTF-8... done
Generation complete.
Usando dpkg-reconfigure locales
admin@Gildurklaus:~$ sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
fr_FR.UTF-8... done
Generation complete.
E também remover locales e instalá-lo e usar dkg-reconfigure locales
.
admin@Gildurklaus:~$ sudo apt-get purge locales
Reading package lists... Done
Building dependency tree
Reading state information... Done
After this operation, 16.7 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 55469 files and directories currently installed.)
Removing locales (2.19-18+deb8u10) ...
Purging configuration files for locales (2.19-18+deb8u10) ...
Processing triggers for man-db (2.7.0.2-5) ...
admin@Gildurklaus:~$ sudo apt-get install locales
Reading package lists... Done
Building dependency tree
Reading state information... Done
After this operation, 16.7 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package locales.
(Reading database ... 54861 files and directories currently installed.)
Preparing to unpack .../locales_2.19-18+deb8u10_all.deb ...
Unpacking locales (2.19-18+deb8u10) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up locales (2.19-18+deb8u10) ...
Generating locales (this might take a while)...
Generation complete.
admin@Gildurklaus:~$ sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
fr_FR.UTF-8... done
Generation complete.
Definindo / etc / default / locale com update-locale
admin@Gildurklaus:~$ sudo update-locale LANG=fr_FR.UTF-8
admin@Gildurklaus:~$
Também comentei as configurações de idioma em ssh_config
e sshd_config
apenas para garantir:
admin@Gildurklaus:~$ cat /etc/ssh/sshd_config | grep LANG
# AcceptEnv LANG LC_*
admin@Gildurklaus:~$ cat /etc/ssh/ssh_config | grep LANG
# SendEnv LANG LC_*
Mas nada disso funciona. Estes são os resultados:
/etc/default/locale
parece bem
admin@Gildurklaus:~$ cat /etc/default/locale
# File generated by update-locale
LANG=fr_FR.UTF-8
Eu posso encontrar minha localidade francesa, mas o que C e POSIX estão fazendo lá?
admin@Gildurklaus:~$ locale -a
C
C.UTF-8
POSIX
fr_FR.utf8
Aqui, a língua francesa está completamente ausente. Por quê?
admin@Gildurklaus:~$ locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
admin@Gildurklaus:~$ date
Sat May 12 10:57:56 CEST 2018
Tags locale raspberry-pi