From owner-freebsd-i18n@FreeBSD.ORG Fri Aug 29 23:01:07 2008 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C621065673 for ; Fri, 29 Aug 2008 23:01:07 +0000 (UTC) (envelope-from aragon@phat.za.net) Received: from mail.geek.sh (decoder.geek.sh [196.36.198.81]) by mx1.freebsd.org (Postfix) with ESMTP id 4AB0D8FC08 for ; Fri, 29 Aug 2008 23:01:07 +0000 (UTC) (envelope-from aragon@phat.za.net) Received: by mail.geek.sh (Postfix, from userid 1000) id E636D24D22; Sat, 30 Aug 2008 01:01:05 +0200 (SAST) Date: Sat, 30 Aug 2008 01:01:05 +0200 From: Aragon Gouveia To: "Loren M. Lang" Message-ID: <20080829230105.GA54406@phat.za.net> References: <20080828003426.GB57611@phat.za.net> <716a8d5f0808281211s73f753bs557b3ac4446410ed@mail.gmail.com> <20080828192652.GB40752@phat.za.net> <20080828194209.GA44154@phat.za.net> <716a8d5f0808290205v53257632qa7ceb8bc3dcd3e8b@mail.gmail.com> <1220031798.7224.69.camel@habakkuk.aloha.tallye.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220031798.7224.69.camel@habakkuk.aloha.tallye.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.10-RELEASE-p2 i386 Cc: freebsd-i18n@freebsd.org Subject: Re: Adding or editing a locale X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 23:01:07 -0000 | By Loren M. Lang | [ 2008-08-29 19:43 +0200 ] > Hmm, I'm curious what happens when a less common locale such as en_ZA is > used and a certain application does not, for example, it has no > translations for en_ZA. As I understand it, it will default to trying > simply en as a locale, but is en equivalent to en_US or en_GB which are > two locales applications are more likely to implement. Since a > considerable amount of the software is written in the US, I'd expect > that for some applications en would translate to en_US even though en_GB > is a more appropriate substitute for en_ZA. (Unless I'm mistaken, I > have only been to South Africa once.) How exactly do fallbacks work? I stand to be corrected, but I think if an application lacks translations for a locale it will fall back to the "C" locale (or rather, not change the locale from where it was). In the "C" locale and in terms of gettext (LC_MESSAGES) this means no translation will take place in application messages, so the message output will be in the language and dialect in which they were written in the application source itself. In terms of ctype, collation, etc., I would guess the C locale uses en_US symantics, but that is probably system dependent. As for en_ZA, you are correct - en_GB is a better substitute than en_US. Plain en I think should be prioritised as international english or any english in that order, so the best fit would be en_GB or any other en dialect which is supported by your app (in that order). That is just my opinion. setlocale() doesn't define a fallback mechanism in this case, so trying to call setlocale() for "en" on FreeBSD, for example, should return NULL and leave the locale unchanged. A fallback regime like you describe would need to be application defined. Regards, Aragon