X-Recipient: archive-cygwin@delorie.com X-Spam-Check-By: sourceware.org Date: Wed, 12 Jan 2011 11:55:59 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: suggestion (was Re: 1.7.7: Localization does not follow the language of the OS) Message-ID: <20110112105559.GI6353@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <44682.83.86.0.251.1294773608.squirrel@lavabit.com> <4D2CFAC9.6040706@laposte.net> <20110112095907.GC6353@calimero.vinschen.de> <4D2D7D5D.7080800@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D2D7D5D.7080800@gmx.de> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com On Jan 12 11:07, Matthias Andree wrote: > Am 12.01.2011 10:59, schrieb Corinna Vinschen: > > On Jan 12 01:50, Cyrille Lefevre wrote: > >> > >> Hi > >> > >> an interresting registry entry would be : > >> > >> /proc/registry/HKEY_CURRENT_USER/Control Panel/International/LocaleName > >> > >> in france, under vista, it's fr-FR which is easy to translate to > >> fr_FR.UTF-8... > >> > >> how about to integrate something like this in lang.sh : > >> > >> [ -n "${LC_ALL:-${LC_CTYPE:-$LANG}}" ] && return > > > > The official way to set the locale is to use the locale(1) tool, see the > > User's Guide http://cygwin.com/cygwin-ug-net/using-utils.html#locale > > > > export LANG=`locale -u` setenv LANG `locale -u` > > export LANG=`locale -s` setenv LANG `locale -s` > > Everybody using POSIX shell syntax (the left column) should consider using > $(...) command substitution instead of the obsolete backticks `...`. The former > mixes properly with quoting, so to get into the right habit and set the proper > example: > > export LANG="$(locale -uU)" # (or -sU for system default locale) It's just another way to express the same. Backticks are not obsolete. The backtick style is exactly as much POSIX as the $() style. See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18 Other than that, this isn't a mailing list about programming style. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple