Closed (won't fix)
Project:
Country codes API
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2010 at 11:33 UTC
Updated:
6 Aug 2011 at 18:17 UTC
I often find myself writing code that translates language codes from for instance da-DK => da or nb-NO => no or even sometimes nb => no depending on the use of the language code I need to talk to external services. I know that quite a few drupal sites use the xx-XX because they have multiple languages in the same country.
I am wondering if it makes any sense to include these things in this module? Or make another module? There are certainly different use cases to language and country codes, but there might also be advantages?
I can take a shot at some code for it if it makes sense to include in this module :)
Comments
Comment #1
matkeane commentedHi,
I just found this issue while hunting around for solutions to map alpha2 country codes in requests from an external application to the Drupal language codes used on the site, so any functions that would make this kind of thing easier would be a welcome addition in my opinion. I realize it might not be as simple as it first appears (languages don't always map one-to-one to countries), but it would be nice to centralize efforts somewhere so as to avoid re-inventing the wheel each time. Whether this module, or something like locale or i18n, is the best place for it is up to the maintainer, but since this module is the most comprehensive one for country codes (thanks for the very useful resource, by the way!) it might make sense to broaden its scope a little.
Comment #2
mrfelton commentedmatkeane - Perhaps what you are looking for is http://drupal.org/project/ip2locale ?
Comment #3
matkeane commentedHi, Good tip - I think I skipped over that module as I assumed, from the name, that it only did the IP lookups, but it looks like some of the supporting functions might be very handy for the country-language code conversions - many thanks!
Comment #4
Scyther commentedMaintenance fixes only for this module. So no new features will go into this module.