Need tutoring: 'locale'
Kurt Wall
kwall
Mon May 17 11:56:16 PDT 2004
Consuming 1.1K bytes, Michael Hipp blathered:
> David A. Bandel wrote:
>
> >This _is_ *nix fashon. Things like locale settings are normally
> >user-specific. Yes, a system may be set up to run all in Spanish, but
> >some users may be French, English, German, etc.
>
> Well, ok, if you say so. But I wasn't trying to argue that locale
> settings had to be system wide, I was assuming this would work like
> seemingly everything in *nix works (i.e. put settings in a config file,
> run something that knows what to do with the file. No implication that
> there can be only one such file per system.) And I'm still trying to
> figure out if this is different or I just don't know what file to start
> with; maybe the answer is in here:
You have, I suppose, three options.
1) Set the locale system-wide in /etc/profile or its equivalent.
2) Set the locale on a per-user basis in $HOME/.profile (($LANG or
$LC_ALL) or its equivalent .
3) Programmatically, use the C library's facilities for querying
and modifying the locale information, then use the same facilities
to make sure that your program honors the preferred locale.
Kurt
--
"He's the kind of man for the times that need the kind of man he is ..."
More information about the Linux-users
mailing list