W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

Re: [whatwg] Proposal: Locale Preferences API

From: 신정식, 申政湜 <jshin@chromium.org>
Date: Wed, 27 Nov 2013 13:28:04 -0800
Message-ID: <CADaTyXWhFuM2eoq+em+S74iu8n=q7RCt4hxqmnR9b0kbo010OQ@mail.gmail.com>
To: Erik Arvidsson <arv@chromium.org>
Cc: whatwg <whatwg@lists.whatwg.org>, Ian Hickson <ian@hixie.ch>, Nebojša Ćirić <cira@google.com>, Marcos Caceres <w3c@marcosc.com>
The proposal looks good except for one reservation I have about. A few
years ago, we proposed a similar API to webkit-dev, but it's 'killed' there
and we didn't bring it up in whatwg (Chromium ended up adding an extension
API for that for Chrome extensions).

My reservation is :  it's not a good idea to "conflate" the browser's UI
language and the ordered list of preferred content languages
(Accept-Language).  Specifically, I think it's better to leave alone
'navigator.language' when the preferred list of languages is changed.


*2.1 If the first item of the lang list is not the same value as the value
of*
*the 'navigator' object's `language` attribute, update the `navigator`
object's `*
*attribute` to be the first item lang list.*

That is, I suggest that 'navigator.language' always be the UI language of a
web browser. When the 'preferred lang list' changes, it should NOT affect
'navigator.language' (singular) but ONLY updates 'navigator.languages'
(plural).

If 'language vs languages' is likely to cause confusion/errors, we might as
well choose to use 'preferredLanguages' or 'preferredContentLanguages' for
the latter.


Jungshik






2013/10/16 Erik Arvidsson <arv@chromium.org>

> This looks very useful and the proposal looks solid.
>
>
> On Mon, Oct 14, 2013 at 6:43 PM, Ian Hickson <ian@hixie.ch> wrote:
>
> > On Mon, 14 Oct 2013, Marcos Caceres wrote:
> > >
> > > Ping?
> > >
> > > Mozilla would like to know if anyone else is interested or specially if
> > > people are NOT interested. We would like to implement this and expose
> it
> > > on the platform.
> > >
> > > See:  https://bugzilla.mozilla.org/show_bug.cgi?id=780953
> >
> > I was just looking at this, actually. I filed the following bug to track
> > it: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23517
> >
> > Seems like a reasonable feature to me, FWIW.
> >
> > See also:
> >
> >    Notification of change to navigator.language (locale change)
> >    https://www.w3.org/bugzilla_public/show_bug.cgi?id=21289
> >
> >    API to expose locale-specific settings
> >    https://www.w3.org/Bugs/Public/show_bug.cgi?id=22679
> >
> >    API to expose actual language of a node, to aid scripts doing
> >    localisation and CJK editors during copy&paste and drag&drop
> >    https://www.w3.org/Bugs/Public/show_bug.cgi?id=23512
> >
> > --
> > Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> > http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> > Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
> >
>
>
>
> --
> erik
>
Received on Wednesday, 27 November 2013 21:28:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC