This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Dec  3 18:17, 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

Indeed, that's the reason I suggested that getlocale should return the
default system locale, not the user default locale.  So, even by using
getlocale, the user could overwrite the system choice by

  eval `getlocale -uU`

in .bashrc.  However, we should get out 1.7.1 first.  We can always
change this afterwards.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]