[OSM-dev] Storing language (was Re: Database Schema)

Stefan Baebler stefan.baebler at gmail.com
Wed Jun 27 15:42:02 BST 2007


Keep also in mind that browsers are sending accept-language header
along with each http request. That one looks like
Accept-Language:en-us,en;q=0.7,sl;q=0.3
Using a 3 letter language codes would be incompatible (would require
an extra mapping), so i'd suggest to stick to either 2 (lang) or 5
(lang-region) characters.

Stefan

On 6/27/07, Dan Karran <dan at karran.net> wrote:
> On 6/26/07, Tom Hughes <tom at compton.nu> wrote:
> > In message <4680B8AA.4090301 at sxpert.org>
> >         Raphaël Jacquot <sxpert at sxpert.org> wrote:
> >
> > > D Tucny wrote:
> > >> On 23/06/07, Dan Karran <dan at karran.net> wrote:
> > >>> - latitude (double)
> > >>> - longitude (double)
> > >>> - language (varchar(2))
> > >>
> > >>
> > >> Quick point, surely language needs to be more than 2 chars?
> > >
> > > see the ISO639-2 language table here :
> > > http://www.loc.gov/standards/iso639-2/php/English_list.php
> > >
> > > looks like it needs 3 chars
> >
> > That all rather depends on how precise we need to be... More
> > information on the ISO639 variants at:
> >
> >   http://en.wikipedia.org/wiki/ISO_639
> >
> > Personally I would stick with IETF language tags:
> >
> >   http://en.wikipedia.org/wiki/IETF_language_tag
> >   http://tools.ietf.org/html/rfc4646
> >
> > That will need more than 2 characters though, especially if you
> > want to allow the -region form.
>
> That'd be fine to store the IETF version (and leave space for a fully
> qualified language code). It seems to be the way forward.
>
> For now though, I suspect we should just store the 2 or 3 letter
> language code (the left most part of the full code) to keep it as
> simple as possible. In the future we could then add regions and
> scripts and things if necessary.
>
>
> Cheers,
> Dan
>
> --
> Dan Karran
> dan at karran.net
> www.dankarran.com
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>


More information about the dev mailing list