LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-07-2008, 03:41 PM   #1
mlambrechts
LQ Newbie
 
Registered: Jun 2008
Location: Belgium
Distribution: Opensuse
Posts: 15

Rep: Reputation: 0
Question Opensuse: can you add users with different language?


Does anyone know if in opensuse it is possible to add a user with a different language than root. I mean, that every user can open his desktop in his specific language? I am root+user in dutch. But my wife is Brazilian, and I want to give her a user account completely in Portuguese. Is this possible?
 
Old 06-07-2008, 04:46 PM   #2
google01103
Member
 
Registered: May 2006
Distribution: Suse 10.2 x64
Posts: 247

Rep: Reputation: 31
seems that it would be a given

see http://elibrary.fultus.com/technical...a.y2.lang.html

if you're using kde open kcontrol -> region and accesibility -> country/region & language

if using gnome check in it's control center
 
Old 06-07-2008, 05:13 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
Quote:
Originally Posted by mlambrechts View Post
Does anyone know if in opensuse it is possible to add a user with a different language than root. I mean, that every user can open his desktop in his specific language? I am root+user in dutch. But my wife is Brazilian, and I want to give her a user account completely in Portuguese. Is this possible?
Yes. Though "localization" (it's the label we use to talk about this) is a thing that sometimes can depend a bit on the distro you use.

Some desktops, like kde, have specific support for languages. In kde you can install support for lots of languages by installing the kde-i18n package. It can be a big package or it can be a set of small packages (one per language) depending on your distro.

In any case, once you have installed the language packages, you can change the localization settings from kcontrol (the kde control panel). I don't know if there's something similar in gnome or xfce.

For the rest of the system, the language and localization settings are usually controlled by the value of the LC_* variables.

To check the currect value, you have to open an xterm (or operate in plain command line) and do type this command:

Code:
$ locale
LANG=es_ES.utf8
LC_CTYPE="es_ES.utf8"
LC_NUMERIC="es_ES.utf8"
LC_TIME="es_ES.utf8"
LC_COLLATE="es_ES.utf8"
LC_MONETARY="es_ES.utf8"
LC_MESSAGES="es_ES.utf8"
LC_PAPER="es_ES.utf8"
LC_NAME="es_ES.utf8"
LC_ADDRESS="es_ES.utf8"
LC_TELEPHONE="es_ES.utf8"
LC_MEASUREMENT="es_ES.utf8"
LC_IDENTIFICATION="es_ES.utf8"
LC_ALL=es_ES.utf8
The "locale" command tells us what the actual localization settings. So, to change the localization settings would be as easy as to change the value of these variables. The master one -which controls the rest of them- is LC_ALL. LANG is used by many programs to control the language as well. For example, with the settings above, if I fire up gimp I get this (screenshot):

http://jesgue.homelinux.org/other-files/gimp-es_ES.jpg

On the contrary, if I use the C locale, this is what I get:

http://jesgue.homelinux.org/other-files/gimp-C.jpg

As you can see, you can temporarily change the locale to run a single command, like this:

Code:
$ LC_ALL=C gimp
"C" is the posix locale, and it happens to be mostly equivalent to the english ones. It's the default locale if no locale is set.

The next piece of the puzzle is to find a correct locale for your wife. To see the available locales, you can use this command to see the available locales:

Code:
$ locale -a
If my memory serves correctly, a good locale for your wife would be either of pt_BR@.utf8 or pt_BR.iso-8859-15 (or pt_BR.iso-8859-1, not sure).

I advise you to use utf8 locales from now on, since that's what the future will bring us anyway, and using any other thing is not smart nowadays unless you have a given purpose in mind. So, i'd just use pt_BR.utf8.

If that locale is not on the list of available locales, you will need to build it yourself. The list of locales is stored into /etc/locale.gen. I share mine as a example:

Code:
es_ES ISO-8859-15
es_ES.UTF-8 UTF-8
ca_ES.UTF-8 UTF-8
en_US ISO-8859-15
en_US.UTF-8 UTF-8
You can put as many as you want, change them accordingly to include all the locales you want to use in your system (and more if you want).

Then as root you need to run:

Code:
$ locale-gen
The locales should be generated, now they should be listed in the output of locale -a, and you should be able to test any locale by doing

Code:
LC_ALL=<chosen locale> gimp
You can also test nano or any other program to test. The language of the interfact should adapt itself to the locale.

Now the problem is how to setup it widely for the current user. Each distro has a different way to do this. But if you want to set this locale only for your wife, there's an easy way. On the command line department, you just need to include a couple of lines in these two files on her home dir: ~/.bashrc and ~/.bash_profile, the lines are:

Code:
# Localization
export LANG=es_ES.utf8
export LC_ALL=es_ES.utf8
Those are mine, again, adapt them to her locale.

This might not work for X programs if you login directly into X, though. In that case, you should check the documentation for your distribution. Most distros heavily document the localization process. It's a common procedure.
 
Old 06-09-2008, 09:02 AM   #4
mlambrechts
LQ Newbie
 
Registered: Jun 2008
Location: Belgium
Distribution: Opensuse
Posts: 15

Original Poster
Rep: Reputation: 0
Thumbs up Thanks

Thank you very much for the reply. It was very helpful!
 
  


Reply

Tags
languages, opensuse103, user


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
openSuSE 10.3 live: Setting different language permanently? gargamel Suse/Novell 1 01-08-2008 01:12 PM
Add language setting sunhui Linux - General 0 12-27-2006 10:17 PM
Add new language ohade Mandriva 1 12-10-2005 02:44 AM
can't add a language nikoz Slackware 4 11-30-2005 05:37 AM
Add another language panfx Linux - General 2 08-05-2003 09:51 AM


All times are GMT -5. The time now is 02:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration