Obscaenvs | 6 Mar 12:38 2013
Picon

Country names and language names

Hi! I am working on an app in Yesod that craves I18N. A problem I've
come across there is giving correct country and language names based on
currently selected language. So far, I've used the Yesod I18N message
approach, but a lot of hand coding is involved.

The iso3166-country-codes [1] package at Hackage by Jon Fairbairn
provides a start in the right direction, but an obvious improvement upon
it would be to have a function or map that takes an ISO 639 code and an
ISO 3166 code and gives the correct human-readable name for the country
as per the chosen target language (the ISO 639 code), and another
function/map for languages. It would alleviate coding those pesky
country and language switchers a *lot*, among other things.

Jon Fairbarn that coded the iso3166-country-codes package said in
private correspondence that it seemed worthwhile doing, but he couldn't
do it in his spare time, which is understandable. I am willing to do
some of the stuff involved (I know Swedish, French and some Turkish in
addition to the ubiquitous English), but obviously it's too big a
project for one man to handle (what with all the c'n'p involved :) ).

I feel that this should be done, since it seems it isn't yet. I am
inexperienced in coordinating such endeavours, though, so I would like
to share that task at least to begin with, if possible.

Any thoughts?

[1] http://hackage.haskell.org/package/iso3166-country-codes-0.20111111.4

/Fredrik
(Continue reading)

Mateusz Kowalczyk | 6 Mar 13:28 2013
Picon

Re: Country names and language names

On 06/03/13 11:38, Obscaenvs wrote:
> Hi! I am working on an app in Yesod that craves I18N. A problem I've
> come across there is giving correct country and language names based on
> currently selected language. So far, I've used the Yesod I18N message
> approach, but a lot of hand coding is involved.
> 
> The iso3166-country-codes [1] package at Hackage by Jon Fairbairn
> provides a start in the right direction, but an obvious improvement upon
> it would be to have a function or map that takes an ISO 639 code and an
> ISO 3166 code and gives the correct human-readable name for the country
> as per the chosen target language (the ISO 639 code), and another
> function/map for languages. It would alleviate coding those pesky
> country and language switchers a *lot*, among other things.
> 
> Jon Fairbarn that coded the iso3166-country-codes package said in
> private correspondence that it seemed worthwhile doing, but he couldn't
> do it in his spare time, which is understandable. I am willing to do
> some of the stuff involved (I know Swedish, French and some Turkish in
> addition to the ubiquitous English), but obviously it's too big a
> project for one man to handle (what with all the c'n'p involved :) ).
> 
> I feel that this should be done, since it seems it isn't yet. I am
> inexperienced in coordinating such endeavours, though, so I would like
> to share that task at least to begin with, if possible.
> 
> Any thoughts?
> 
> [1] http://hackage.haskell.org/package/iso3166-country-codes-0.20111111.4
> 
> /Fredrik
(Continue reading)

Henk-Jan van Tuyl | 6 Mar 14:20 2013
Picon

Re: Country names and language names

On Wed, 06 Mar 2013 12:38:11 +0100, Obscaenvs <obscaenvs <at> gmail.com> wrote:

:
:
> The iso3166-country-codes [1] package at Hackage by Jon Fairbairn
> provides a start in the right direction, but an obvious improvement upon
> it would be to have a function or map that takes an ISO 639 code and an
> ISO 3166 code and gives the correct human-readable name for the country
> as per the chosen target language (the ISO 639 code), and another
> function/map for languages. It would alleviate coding those pesky
> country and language switchers a *lot*, among other things.
>
> Jon Fairbarn that coded the iso3166-country-codes package said in
> private correspondence that it seemed worthwhile doing, but he couldn't
> do it in his spare time, which is understandable. I am willing to do
> some of the stuff involved (I know Swedish, French and some Turkish in
> addition to the ubiquitous English), but obviously it's too big a
> project for one man to handle (what with all the c'n'p involved :) ).
>
> I feel that this should be done, since it seems it isn't yet. I am
> inexperienced in coordinating such endeavours, though, so I would like
> to share that task at least to begin with, if possible.
>
> Any thoughts?

You can find the Dutch names in the Dutch Wikipedia:
   http://nl.wikipedia.org/wiki/Lijst_van_ISO_639-1-codes
   http://nl.wikipedia.org/wiki/ISO_3166-1

Do not forget that country names can change; e.g. the Netherlands Antilles  
(Continue reading)

Obscaenvs | 6 Mar 20:53 2013
Picon

Re: Country names and language names

Thanks for the input -- both items.
f

Le 2013-03-06 14:20, Henk-Jan van Tuyl a écrit :
> On Wed, 06 Mar 2013 12:38:11 +0100, Obscaenvs <obscaenvs <at> gmail.com> wrote:
> 
> :
> :
>> The iso3166-country-codes [1] package at Hackage by Jon Fairbairn
>> provides a start in the right direction, but an obvious improvement upon
>> it would be to have a function or map that takes an ISO 639 code and an
>> ISO 3166 code and gives the correct human-readable name for the country
>> as per the chosen target language (the ISO 639 code), and another
>> function/map for languages. It would alleviate coding those pesky
>> country and language switchers a *lot*, among other things.
>>
>> Jon Fairbarn that coded the iso3166-country-codes package said in
>> private correspondence that it seemed worthwhile doing, but he couldn't
>> do it in his spare time, which is understandable. I am willing to do
>> some of the stuff involved (I know Swedish, French and some Turkish in
>> addition to the ubiquitous English), but obviously it's too big a
>> project for one man to handle (what with all the c'n'p involved :) ).
>>
>> I feel that this should be done, since it seems it isn't yet. I am
>> inexperienced in coordinating such endeavours, though, so I would like
>> to share that task at least to begin with, if possible.
>>
>> Any thoughts?
> 
> You can find the Dutch names in the Dutch Wikipedia:
(Continue reading)

Henk-Jan van Tuyl | 6 Mar 23:26 2013
Picon

Re: Country names and language names

On Wed, 06 Mar 2013 20:53:57 +0100, Obscaenvs <obscaenvs <at> gmail.com> wrote:

> Thanks for the input -- both items.
> f

>> Do not forget that country names can change; e.g. the Netherlands
>> Antilles were split up in 2010. This might cause problems if you store
>> country codes in a database. If you simply remove obsolete country
>> codes, the database can not be used properly any more.

P.S. If you want people to be able to enter there country of birth, you  
should include all countries that existed in the past 116 years; if  
historians should be able to use it, you should include all countries that  
ever existed.

When you include obsolete names, there should be some way to create a list  
of current countries, e.g. for selection of the country, where someone  
lives, from a menu. Something like this:
   map isCurrentlyExisting listOfAllCountriesThatEverExisted
Or you create a list of current countries and a list of obsolete countries.

Regards,
Henk-Jan van Tuyl

--

-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--
(Continue reading)

Henk-Jan van Tuyl | 7 Mar 08:05 2013
Picon

Re: Country names and language names

On Wed, 06 Mar 2013 23:26:01 +0100, Henk-Jan van Tuyl <hjgtuyl <at> chello.nl>  
wrote:

> someone lives, from a menu. Something like this:
>    map isCurrentlyExisting listOfAllCountriesThatEverExisted

That should be
    filter isCurrentlyExisting listOfAllCountriesThatEverExisted
of course.

Regards,
Henk-Jan van Tuyl

--

-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--
Jon Fairbairn | 8 Mar 10:56 2013
X-Face
Picon
Picon

Re: Country names and language names

"Henk-Jan van Tuyl" <hjgtuyl <at> chello.nl> writes:

> On Wed, 06 Mar 2013 20:53:57 +0100, Obscaenvs <obscaenvs <at> gmail.com> wrote:
>>> Do not forget that country names can change; e.g. the Netherlands
>>> Antilles were split up in 2010. This might cause problems if you store
>>> country codes in a database. If you simply remove obsolete country
>>> codes, the database can not be used properly any more.
>
> P.S. If you want people to be able to enter there country of
> birth, you should include all countries that existed in the
> past 116 years; if  historians should be able to use it, you
> should include all countries that  ever existed.

These are both important points, but I think they fall outside
the remit of a library for ISO 3166 country codes, which I wrote
originally for use in circumstances where some other standard
just says “an ISO 3166 country code”. If the country codes
standard included (as ISO 639 language codes does) historical
codes, it would be appropriate to include them in that library,
but since it doesn’t, it requires a separate library.

Quite how far one should go back in this separate library I
cannot say, but there are obvious use cases for country /names/
for countries that ceased to exist before 1974 and which
therefore have never had an ISO 3166 country code.

* * *

I’m currently working on ISO 639 which again will be a
presentation of the standard as Haskell data types. It requires
(Continue reading)


Gmane