W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: I18N issue: case-sensitivity of locale subdirectories

From: Marcos Caceres <marcosc@opera.com>
Date: Tue, 5 May 2009 12:16:11 +0200
Message-ID: <b21a10670905050316k337d9cbbr9a8a27b0ea6d93ef@mail.gmail.com>
To: Robin Berjon <robin@berjon.com>
Cc: public-webapps WG <public-webapps@w3.org>
On Wed, Apr 29, 2009 at 4:16 PM, Robin Berjon <robin@berjon.com> wrote:
> Hi,
>
> the following issue has cropped up in the I18N model as described in the
> excellent I18N document from Marcos[0].
>
> Assume we have two localisation subdirectories:
>
>  locales/en/
>  locales/EN/
>
> What happens? BCP47 (which we reference) is defined to be case-insensitive
> so it doesn't help us much in this respect.
>
> There are multiple options:
>
>  a) we define a canonical casing and all others are ignored;
>  b) we select an order of priority and we only consider one (the first to
> match);
>  c) we select an order of priority and we merge them all (in that order,
> with a given precedence rule);
>  d) the device on which the user agent is catches fire.
>
> I think that (a) should be ruled out because as BCP47 tells us, ISO639-1
> recommends lowercase (language codes), ISO3166-1 recommends uppercase
> (country codes), and ISO15924 recommends titlecase (script codes). These are
> different, but likely to be confusing, and I don't think that developers
> should have to worry about that.

Agreed.

> I'd like to reject (d) as out of line with our design preferences.

Awww... :(

> I don't have a strong opinion on this, but I do I have a preference for a
> rule based on (b): if multiple locale subdirectories have the same
> case-insensitive name, then the one that comes first in ASCII-code order
> (e.g. in order: EN, En, eN, en) is used and the others are ignored.

This seems reasonable. I will add this.

> The argument in favour of only using one is that we already have to merge
> multiple directories, and adding one merge operation for what is in all
> probability a user error seems like too much complexity for little value
> (I'm happy to be contradicted by implementers however). Picking ASCII-code
> order is based on the fact that the directory names must be ASCII here (the
> others must be discarded), and picking the first is arbitrary.
>
> Thoughts?

I support b. Added some of your text above to the spec.

>
> [0]http://dev.w3.org/cvsweb/~checkout~/2006/waf/widgets/i18n.html?rev=1.29&content-type=text/html;%20charset=utf-8
>
> --
> Robin Berjon - http://berjon.com/
>    Feel like hiring me? Go to http://robineko.com/
>
>
>
>
>
>
>



-- 
Marcos Caceres
http://datadriven.com.au
Received on Tuesday, 5 May 2009 10:17:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT