Milestone Schedule

Update Currency Codes

Instructions updated 2013-03-11 by J. C. Emmons
  • Go to http://www.currency-iso.org/en/home/tables/table-a1.htm
  • Take the link for "Table A.1 (XML)"
  • Save the page as {cldrdata}\tools\java\org\unicode\cldr\util\data\dl_iso_table_a1.xml
  • Go to http://www.currency-iso.org/en/home/tables/table-a3.html
  • Take the link for "Table A.3 (XML)"
  • Save the page as {cldrdata}\tools\java\org\unicode\cldr\util\data\dl_iso_table_a3.xml
    • Use SVN diff to sanity check the two XML files against the old, and check them in.
  • Run CountItems -Dmethod=generateCurrencyItems to generate the new currency list.
    • If any currency is missing from ISO4217.txt, the program will throw an exception and will print a list of items at the end that need to be added to the ISO4217.txt file. Add as described below.
    • Once the necessary codes are added to ISO4217.txt, repeat the CountItems -Dmethod=generateCurrencyItems until it runs cleanly.
    • If any country changes the use of a currency, verify that there is a corresponding entry in SupplementalData
    • Since ISO doesn't publish the exact date change (usually just a month), you may need to do some additional research to see if you can determine the exact date when a new currency becomes active, or when an old currency becomes inactive.  If you can't find the exact date, use the last day of the month ISO publishes for an old currency expiring.
    • For new stuff, see below.
  • Adding a currency:
    • Make sure the new code exists in common/bcp47/currency.xml.  The currency code should be in lower case, and make sure the "since" release corresponds to the next release of CLDR that will publish using this data.
    • In SupplementalData:
    • If it has unusual rounding or number of digits, add to:
      • <fractions>
      • <info iso4217="ADP" digits="0" rounding="0"/>
      • ...
    • For each country in which it comes into use, add a line for when it becomes valid
      • <region iso3166="TR">
      • <currency iso4217="TRY" from="2005-01-01"/>
    • Add the code to the file java/org/unicode/cldr/util/data/ISO4217.txt. This is important, since it is used to get the valid codes for the survey tool.
      • Example:
        • currency | TRY | new Turkish Lira | TR | TURKEY | C
      • Mark the old code in java/org/unicode/cldr/util/data/ISO4217.txt as deprecated.
        • currency | TRL | Old Turkish Lira | TR | TURKEY | O
  • Changing currency.
    • If the currency goes out of use in a country, then add the last day of use, such as:
      • <region iso3166="TR">
      • <currency iso4217="TRL" from="1922-11-01"/>
      • =>
      • <region iso3166="TR">
      • <currency iso4217="TRL" from="1922-11-01" to="2005-12-31"/>
    • Edit common/main/en.xml to add the new names (or change old ones) based on the descriptions.
      • If there is a collision between a new and old name, the old one typically changes to the currency name with the date range
        • "currency_name (1983-2003)".
  • Check in your changes
    • common/bcp47/currency.xml
    • tools/java/org/unicode/cldr/util/data/ISO4217.txt
    • common/main/en.xml
    • common/supplemental/supplementalData.xml
  • Note: We no longer maintain the list of currency in supplementalMetadata.xml (#4298). The list is currently maintained by bcp47/currency.xml. We need to move the code used for checking list of ISO currency (and its numeric code mapping) currently in ICU tools repository (http://source.icu-project.org/repos/icu/tools/trunk/currency/).
Comments