You are not logged in.

#1 2007-12-28 17:20:36

May-C
Member
Registered: 2007-12-28
Posts: 83

[SOLVED] Localization

Hello

Following Problem:
I want to have a bilingual system with KDE.  German for me and Spanish for my wife. That does not seem to be that hard but after researching for days I have not found a solution. The systemwide language is set to German.

What is working yet:
In my account (German):
Everything, as the systemwide language is set to german.

In the account of my wife (Spanish):
All kde apps work because I can set their language in the control center.
All programs started from the bash as I set export LC_ALL="es_EC.utf8" in the .bashrc

What does not work (in the account of my wife):
All Non-KDE programs started with alt+f2
All Non-KDE programes choosen with the kmenu
...

Has somebody an idea how to set the language for a single user?

Last edited by May-C (2007-12-29 09:21:41)

Offline

#2 2007-12-28 17:59:57

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

Re: [SOLVED] Localization

You may have already tried, but there is an item like "Regional settings" in the control center. It allows for activating multiple languages. Will probably give you a "switch"- icon in the task bar. It is way back since I tried that, but well - check it out.

Offline

#3 2007-12-28 18:13:18

May-C
Member
Registered: 2007-12-28
Posts: 83

Re: [SOLVED] Localization

Yes but it does not influence any gtk-app. This option is set to Spanish. So konqueror, konsole and so on are all in Spanish. Gimp isn't for an example.

Offline

#4 2007-12-28 18:19:37

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: [SOLVED] Localization

Set $LANG to es_EC.UTF-8 in .bashrc as well. Many programs will rely on $LANG to determine the language to use.

Offline

#5 2007-12-28 18:54:42

May-C
Member
Registered: 2007-12-28
Posts: 83

Re: [SOLVED] Localization

That won't work. As said if I start the program from the bash (e.g. konsole) it works. If i start it with alt+f2 or kmenu it does not work.

So the real question is: Where does kde take the locale from. Surely not from the .bashrc

Offline

#6 2007-12-28 23:24:49

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: [SOLVED] Localization

No, the real question is: How to override the system-wide locale (the one from /etc/profile.d/locale.sh) when logging in from KDM?

I don't know. Yet.


1000

Offline

#7 2007-12-29 09:20:41

May-C
Member
Registered: 2007-12-28
Posts: 83

Re: [SOLVED] Localization

Yes you are of course right....
However after logging in today it works. I guess it is the .bashrc but I am not sure... Seems like log out and log in is not enough.

Offline

#8 2007-12-29 12:30:38

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: [SOLVED] Localization

byte wrote:

No, the real question is: How to override the system-wide locale (the one from /etc/profile.d/locale.sh) when logging in from KDM?

This might be alittle off topic, but I have to switch from Chinese to English on one account.

I use a script I found on a debian thread. I use it to start single applications so all their menus are displayed in Chinese even though my language is still set to English.

ch

#!/bin/sh
#Start application $1 with Chinese environment

if [ -z "$1" ]; then
  echo "Usage: $0 app arg1 arg2 ... "
  exit 1
fi
export LANG=zh_CN.UTF-8
PROG=$1
shift
exec $PROG $*

I made it executible and put it in /usr/shar/bin

So If I want to run gimp so all it's menus are in Chinese I just run from a terminal, or create a menu link to execute...

~ >ch gimp

I don't set "LC_ALL=" so it can't override "LC_CTYPE="

.bashrc

#export LC_ALL="zh_CN.UTF-8"
export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"

I don't set any enviornment variables since they default to the LANG setting en_US.UTF-8

ofcourse I have the correct locales generated and both Chinese and English fonts installed.
Anyway, I guess this is, in a way, overriding the system-wide locale?

Last edited by Leigh (2007-12-29 12:33:00)


-- archlinux 是一个极好的 linux

Offline

#9 2007-12-29 13:54:00

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [SOLVED] Localization

Try to put

export LC_ALL="es_EC.utf8"

in .bash_profile and see what happens.


(lambda ())

Offline

#10 2008-04-12 20:26:17

frodoontop
Member
From: Netherlands
Registered: 2004-05-18
Posts: 37
Website

Re: [SOLVED] Localization

A more logic location would be /etc/rc.local. For example:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
export LANG="nl_NL.UTF-8"

Offline

Board footer

Powered by FluxBB