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'm trying to have everything ready to install a new desktop with a few command line instructions. Unfortunately, to install the language packages, I couldn't find how to do it.

I can run

gnome-language-selector

But it doesn't seems to be usable in command line directly. I need to go on with clicks...

An other thing that could be done is that I do those clicks and find out which packages have been installed and read the changes in /etc/environment and /etc/default/locale (and other /etc/... file?) but the list of packages is probably different depending on the packages installed (Firefox, Thunderbird, LibreOffice, Gnome, ...)

Is there a tool for that? Like let's say :

gnome-language-selector --install fr

or a package that has all necessary dependencies :

sudo apt-get install super-language-pack-fr

Thanks,

share|improve this question

3 Answers 3

up vote 5 down vote accepted

For desktop you can

sudo apt-get install language-pack-[cod] language-pack-gnome-[cod] language-pack-[cod]-base language-pack-gnome-[cod]-base 

But each applications can have its language pack. To know the packages to be installed try:

check-language-support -l [cod]

For example:

check-language-support -l fr
share|improve this answer
    
Thank you, but this doesn't install all that would be installed by gnome-language-selector; in my case : libreoffice-l10n-fr language-pack-gnome-fr language-pack-fr-base hunspell-fr language-pack-gnome-fr-base firefox-locale-fr mythes-fr libreoffice-help-fr hyphen-fr wfrench language-pack-fr thunderbird-locale-fr –  samb Jun 12 '12 at 14:49
    
There are no language-support-writing-[cod] package available for 12.04 ... It disappeared with 11.10. –  samb Jun 12 '12 at 14:55
1  
Edited. Please, check if the last additions are useful...:) –  jasmines Jun 12 '12 at 15:17
1  
Excellent! The final command is sudo apt-get install $(check-language-support -l fr) –  samb Jun 12 '12 at 15:51
    
Or yes | sudo apt-get install `check-language-support -l fr` –  Reinier Post Jun 18 '13 at 19:52

To add french language to Ubuntu using the Software Center:

Install via the software center

Quoted from there:

This metapackage depends on all packages that provide native language support for applications. (like spell checkers, dictionaries, OpenOffice and Mozilla locale packages, etc.).

If you also want your applications and the desktop to be translated, please additionally install language-pack-fr.

So it may not have the language for certain programs.


To add a language to Ubuntu using the Command line:

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo apt-get install language-support-fr
share|improve this answer
    
Thank you, but this doesn't install all that would be installed by gnome-language-selector; in my case : libreoffice-l10n-fr language-pack-gnome-fr language-pack-fr-base hunspell-fr language-pack-gnome-fr-base firefox-locale-fr mythes-fr libreoffice-help-fr hyphen-fr wfrench language-pack-fr thunderbird-locale-fr –  samb Jun 12 '12 at 14:49

Auto install all dependecies:

sudo apt-get -y install `check-language-support -l fr`

where fr is the desired language code.

share|improve this answer
    
hint: the apt-get install can take the -y option. No need to use yes and pipe. –  hakermania Jun 4 at 12:56

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.