2

Similar to how it works for time zones, is there a system defined way of listing out countries? something which is periodically updated to keep up with the times?

I need to generate a list:

ISO 3166-2 (http://en.wikipedia.org/wiki/ISO_3166-2)
Country name (in English)
siliconpi
  • 8,105
  • 18
  • 69
  • 107

1 Answers1

0

on debian-based you can use what is stored in the : /usr/share/i18n/SUPPORTED where all the supported locales are defined

Cédric Julien
  • 78,516
  • 15
  • 127
  • 132
  • just got: drwxr-xr-x 2 root root 12288 Oct 25 2010 charmaps drwxr-xr-x 2 root root 12288 Oct 25 2010 locales in Centos in i18n folder – siliconpi May 02 '11 at 14:44
  • in the /usr/share/i18n/locales/ you will find all the supported locales (in many files instead of only one) – Cédric Julien May 02 '11 at 14:50
  • not sure how i should interpret those files...! :) File: vi_VN one has territory "Vietnam". Should i extract those values from all these files? – siliconpi May 02 '11 at 16:42
  • soome seem to be country proper names , some are abbreviations – siliconpi May 02 '11 at 16:44
  • the territory item seems to be what you're looking for, it is the english name of the country :) For the abbreviate ones it is a problem.... – Cédric Julien May 02 '11 at 16:49