Thursday, May 2, 2024
81
rated 0 times [  81] [ 0]  / answers: 1 / hits: 163549  / 2 Years ago, mon, may 30, 2022, 9:42:19

I have a remote server which I installed and have been trying to unsuccessfully change the locale to french for a few hours. Below are the contents of my locale files:



/etc/default/locale:



LANG="fr_FR.UTF-8"
LANGUAGE="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


/var/lib/locales/supported.d/local:



fr_FR.UTF-8 UTF-8
en_US.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
en_GB.ISO-8859-15 ISO-8859-15
fr_BE.UTF-8 UTF-8
fr_CA.UTF-8 UTF-8
fr_CH.UTF-8 UTF-8
fr_LU.UTF-8 UTF-8
fr_FR ISO-8859-1


Everything is still defaulting to english dates and the $ currency in my web app.
Is there something else I'm overlooking?
I should also mention that I have dpkg re-configured and restarted the server after changes were made.


More From » command-line

 Answers
5

Run the command locale - it should show your current locale.



Generate the locales for french:



sudo locale-gen fr_FR
sudo locale-gen fr_FR.UTF-8


Also, try regenerating the supported locale list by running:



sudo dpkg-reconfigure locales


And update/change the current default locale:



sudo update-locale LANG=fr_FR.UTF-8


Update



Extra steps to try:




  1. Try:



    sudo update-locale LANG="fr_FR.UTF-8" LANGUAGE="fr_FR"
    sudo dpkg-reconfigure locales

  2. Perhaps adding LANG and LANGUAGE in /etc/environment could force a change. Try logout/login or rebooting.


  3. locale will show your current locale for the current user. Perhaps it's worth checking out these files just to be sure no local language variables are set: ~/.profile ~/.bashrc ~/.bash_profile




More info:




[#41324] Tuesday, May 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
donurp

Total Points: 328
Total Questions: 128
Total Answers: 123

Location: Faroe Islands
Member since Thu, Apr 8, 2021
3 Years ago
;