You are not logged in.

#1 2007-02-22 00:01:46

kamagurka
Member
From: Munich, Germany
Registered: 2006-02-20
Posts: 150

Locales missing SOLVED

I have the locale "de_DE.utf8" set in my rc.conf.
I recently noticed a very weird problem with German charachters in my qt apps (and only in my qt apps).
I'm not sure if this is related, but in researching this I wanted to find out if de_DE.utf8 is even a valid locale, so I did what the comments in rc.conf said:

# locale -a
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
C
POSIX

I'm a little freaked out now. Where the hell are my locales?

Edit: Solved. IMHO, there should really be something about running locale-gen in the installation docs. Those only tell you to add your locale to rc.conf, that's it.

Last edited by kamagurka (2007-02-22 02:39:00)


I always roll 20s on my disbelieve checks.
You better believe it.

Offline

#2 2007-02-22 00:26:43

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,730
Website

Re: Locales missing SOLVED

The solution is:
1. as root go to /etc/locale.gen and uncomment the locales you want by deleting the # in front the the corresponding desired locale.
2. as root run locale-gen
3. reboot (I'm sure there is a way to make the changes stick without rebooting but I was unable to find it wink)
4. log in again and type locale -a and you should be able to see the locales you generated.

Hope this helps.

R

Offline

#3 2007-02-22 02:31:50

kamagurka
Member
From: Munich, Germany
Registered: 2006-02-20
Posts: 150

Re: Locales missing SOLVED

Awesome, thank you.
Now if anyone can tell me a way to do this without rebooting, I can mark this as solved.
EDIT: Actually, rebooting was completely unnecessary, I just had to source /etc/profile. Now everything works as it should.

Last edited by kamagurka (2007-02-22 02:37:54)


I always roll 20s on my disbelieve checks.
You better believe it.

Offline

#4 2007-02-22 02:37:32

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Locales missing SOLVED

kamagurka wrote:

Awesome, thank you.
Now if anyone can tell me a way to do this without rebooting, I can mark this as solved.

Maybe you just need to logout and relogin. hmm

Offline

#5 2007-02-22 02:46:51

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,730
Website

Re: Locales missing SOLVED

I did try without re-booting but as soon as I issued locale -a it would return

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

so I decided to reboot and it worked just fine after that.
The only thing that annoys me about that is that rebooting is not a *nix thing and we should not have to do that.
I'm sure there is a way to do it without that step.
BTW, I did try quitting the session and logging back in as suggested by Snowman (good thinking there my friend) but it did not work for me.

R.

Edit: On re-reading kamagurka's post I realize you did something different "source /etc/profile". May be that's the answer and the *nix way.
I'll try that the next time.

Last edited by ralvez (2007-02-22 02:52:39)

Offline

Board footer

Powered by FluxBB