Re: how do you set the locale in FC4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Jan 2006 15:33:32 +1030 Tim wrote:
Tim:
>>> Previously I've set one of my FC4 boxes to the correct locale for me
>>> (en_AU, not the default en_US), but I cannot remember how I did that,
>>> nor find a way to do it now. What's the trick?

Paul Howarth:
>> Edit /etc/sysconfig/i18n ?

Tim:
> Too easy, and it works too! ;-) But I don't remember whether I did it
> that way before, it doesn't jog the memory. And try as I might, during
> the last two installations, I couldn't find a way to install additional
> languages like prior versions did.
>
> I spent ages apropos-ing locale and language. There's a man file for
> setlocale that leads you up the garden path (there's no setlocale
> command).

Seems I spoke too soon. It looks like /etc/sysconfig/i18n is only part
of the equation. On one of my PCs it contains this:

LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
SUPPORTED="en_US.UTF-8:en_US:en"

Yet, if I type "locale" into a CLI, as myself, I get the following back:

LANG=en_AU.UTF-8
...

But as root, or other users, I get en_US answers, thus:

LANG=en_US.UTF-8
...

So there must be somewhere else that sets the locale, but I don't know
where for sure - I can see a ~/.dmrc file with a locale in it, but I
don't know if that's the be-all and end-all for individual user
settings. It appears that /etc/sysconfig/i18n just sets the default.


On Thu, 12 Jan 2006 08:23:14 -0500 Claude Jones wrote:
Don't know if this is what you're looking for, but have you played with this?
/usr/bin/system-config-language
This presupposes you have more than one language already installed, however.

I too had a problem with the default locale being set to en_US-UTF-8 despite selecting a UK keyboard and London timezone at install time.  From memory, the Anaconda graphical installer listed "English" as the only English variant rather than "English (U.S.)", "English (British)" etc.

After a bit of rummaging around I found that the default FC4 installation also fails to correctly list the full set of available locales in /etc/sysconfig/i18n.  Running "/usr/bin/locale --all-locales" gives me a massive list, but the configuration file lists only three on the line beginning "SUPPORTED=...", as shown in Tim's example above.  Consequently, the "system-config-language" tool recommended by Claude Jones lists "English (USA)" as the only available option.  That's what I call Hobson's Choice ;-)

Only once I had manually appended "...:en_GB.UTF-8" to this line of the configuration file would the "sytem-config-language" tool allow me to set my preferred locale.  This, as you might expect, simply sets the value of "LANG=..." in the configuration file and results in a change to the default locale for subsequent logins.  (This system default may still be overridden by dotfiles in your home directory, of course.)

I wonder if this problem with /etc/sysconfig/i18n is a shortcoming of the FC4 installation procedure?

--
Richard.

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux