[Haskell-cafe] Country names and language names

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Wed Mar 6 13:28:10 CET 2013


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
> 
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
Could you not find a table of some sort online with this information
already collected and then simply parse into and put it into a format
you require and then simply copy-paste it into the library?

-- 
Mateusz K.



More information about the Haskell-Cafe mailing list