The old $LANG-in-a-box trick (was Re: X11R7.5 and C.UTF-8)

Thomas Wolff towo@towo.net
Fri Dec 4 09:21:00 GMT 2009


Ken Brown wrote:
> On 12/3/2009 3:15 PM, Andy Koppe wrote:
>> 2009/12/3 Corinna Vinschen:
>>> In theory we could use it in /etc/profile.d/lang.{c}sh:
>>>
>>> /etc/profile.d/lang.sh:
>>>
>>>  test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}" && eval $(getlocale -U)
>>>
>>> /etc/profile.d/lang.csh:
>>>
>>>  if ( $?LC_ALL == 0 && $?LC_CTYPE == 0 && $?LANG == 0 ) eval 
>>> `getlocale -cU`
>>>
>>> If that's desired, I could easily create a getlocale package for the
>>> Base category.
>>
>> It's very tempting, but I'm not sure. A couple of issues to consider:
>> - The setting is too late for terminal and shell, but then again, do
>> any of them care about the language setting (rather than the charset)?
>> - It would change the UI language of localized apps. I'd guess most
>> users would welcome programs speaking their language, but some would
>> complain loudly and demand to know how to get back to English.
>
> You could put something like the following in the default .bashrc:
>
> # Set the language for locale-aware applications to US English...
> # export LANG=en_US.UTF-8
>
> # ...or to UK English
> # export LANG=en_GB.UTF-8
or to ... (100 other options).
But which of them? That's just the issue that the getlocale proposal is 
trying to address.
Thomas



More information about the Cygwin-developers mailing list