Milestone Schedule

Adding a new locale to CLDR

If you are just adding a new country locale (eg we have a locale for the language), you just need to add the new empty locale file, and Update Survey Tool. Otherwise:

Minimal Structure

Before adding a new locale, you must have the core data: see Core Data for New Locales for the process.

Add Data in SVN

  • Before starting to add a new locale, make sure you have the minimal core data that cannot be added through the Survey Tool. See above.
  • Create the new locale files.  If you are adding a single new language locale, for example, language "xx" as spoken in country "YY", you will need two files:
    • common/main/xx.xml - The main locale file containing the core data.  You can use the template in seed/main/und.xml as a starting point.
    • common/main/xx_YY.xml - An empty country locale containing the identification of xx_YY as a valid locale.  You can use the template in seed/main/und_XX.xml as a starting point.
    • See files are here: http://www.unicode.org/repos/cldr/trunk/seed/main/
  • Run the XMLValidator tool against these two files to insure validity. The XMLValidator is the java tool: org.unicode.cldr.util.XMLValidator
  • Add these two files to the repository : svn add xx.xml ; svn add xx_YY.xml
  • Add the plural rules common/supplemental/plurals.xml ).c
    Add the day period rules (if you have them ) to common/supplemental/dayPeriods.xml
  • Add the language subtag to <variable id="$language" type="choice"> in
    common/supplemental/supplementalMetadata.xml
  • If you are adding a new language, add the appropriate default content locale
    to <defaultContent locales="..."> in common/supplemental/supplementalMetadata.xml
    The default content locale is usually the locale where the most people speak the language in question.
  • For new languages, add the new language and its associated subtags to common/supplemental/likelySubtags.xml
  • Also add the English translation for any new languages in  common/main/en.xml
  • Commit all of your work to SVN:
    svn commit -m "cldrbug 9999: Add new locale for xx_YY"
  • Send the literate pop information to Rick, or file a bug, if the language is not already in the supplemental data.

Update Survey Tool

Update the data and restart Survey Tool (Steven, Rick, Mark, or John can do this if you don't have access).
Comments