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

Dan Karran dan at karran.net
Wed Jun 27 09:08:29 BST 2007


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


More information about the dev mailing list