Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to switch to French locale. So I tried the below command:

myUbundu@myUbundu-desktop:~$ export LC_ALL=fr_FR

But I am getting the warning

-bash: warning: setlocale: LC_ALL: cannot change locale (fr_FR)

How to set the locale to French? Do I need to install additional packages?

share|improve this question
add comment

3 Answers 3

up vote 19 down vote accepted

Try the following commands

sudo locale-gen fr_FR
sudo update-locale LANG=fr_FR
share|improve this answer
add comment

With all the steps presented here, this is what I get:

$ 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=en_CL.UTF-8
LANGUAGE=en:es:en
LC_CTYPE="en_CL.UTF-8"
LC_NUMERIC=en_CL.UTF-8
LC_TIME=en_CL.UTF-8
LC_COLLATE="en_CL.UTF-8"
LC_MONETARY=en_CL.UTF-8
LC_MESSAGES="en_CL.UTF-8"
LC_PAPER=en_CL.UTF-8
LC_NAME=en_CL.UTF-8
LC_ADDRESS=en_CL.UTF-8
LC_TELEPHONE=en_CL.UTF-8
LC_MEASUREMENT=en_CL.UTF-8
LC_IDENTIFICATION=en_CL.UTF-8
LC_ALL=

$ export LC_TYPE="en_CL.UTF-8"
$ export LC_ALL="en_CL.UTF-8"
bash: warning: setlocale: LC_ALL: cannot change locale (en_CL.UTF-8)

$ export LC_ALL=en_CL
bash: warning: setlocale: LC_ALL: cannot change locale (en_CL)

$ sudo locale-gen en_CL
[sudo] password for xxxxxx: 
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_CL)

$ sudo update-locale LANG=en_CL
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en:es:en",
        LC_ALL = "en_CL",
        LC_PAPER = "en_CL.UTF-8",
        LC_ADDRESS = "en_CL.UTF-8",
        LC_MONETARY = "en_CL.UTF-8",
        LC_NUMERIC = "en_CL.UTF-8",
        LC_TELEPHONE = "en_CL.UTF-8",
        LC_TYPE = "en_CL.UTF-8",
        LC_IDENTIFICATION = "en_CL.UTF-8",
        LC_MEASUREMENT = "en_CL.UTF-8",
        LC_TIME = "en_CL.UTF-8",
        LC_NAME = "en_CL.UTF-8",
        LANG = "en_CL.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
*** update-locale: Error: invalid locale settings:  LANG=en_CL LANGUAGE="es_CL:es"

and this is the content of my profile file:

LANG="en_CL.UTF-8"
LANGUAGE="en_CL.UTF-8"

Any other ideas, thoughts?

share|improve this answer
    
Have you created a file or editted the actual .profile file (mind the dot)? –  Cheiron 1 hour ago
    
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. –  Jacob Vlijm 2 mins ago
add comment

I have fought with this for a week or so.

The most reliable (and easiest too) for me was to edit my profile file with

gedit ~/.profile

An add this language variables to be set at every login

LANG="en_AU.UTF-8"
LANGUAGE="en_AU:en"

You need to log out and back in for the change to take effect.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.