• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2title: Adding a new locale to CLDR
3---
4
5# Adding a new locale to CLDR
6
7NOTE: this is an internal page for TC developers. Others should see [Core Data for New Locales](https://cldr.unicode.org/index/cldr-spec/core-data-for-new-locales).
8
9### Country Locales
10
11If 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:
12
13### Minimal Structure
14
15Before adding a new locale, you must have the core data: see [Core Data for New Locales](https://cldr.unicode.org/index/cldr-spec/core-data-for-new-locales) for the process.
16
17Here is an example: https://github.com/unicode-org/cldr/pull/59/files
18
19### Add Data in git
20
21- 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.
22- 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:
23	- **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.
24	- **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.
25	- See files are here: https://github.com/unicode-org/cldr/tree/master/seed/main
26- Add the plural rules (if available) to **common/supplemental/plurals.xml**
27- Add the day period rules (if you have them ) to **common/supplemental/dayPeriods.xml**
28- If you are adding a new language
29	- Add the language subtag to \<variable id\="$language" type\="choice"\> in
30	- **/common/supplemental/attributeValueValidity.xml**
31	- add the appropriate default content locale
32	- to \<defaultContent locales\="..."\> in **common/supplemental/supplementalMetadata.xml**
33	- The default content locale is usually the locale where the most people speak the language in question.
34	- If the language is not already in common/supplemental/likelySubtags.xml
35		- Send the literate pop information to Rick, or file a bug, if the language is not already in the supplemental data.
36		- Once he has added, run the tool in [LikelySubtags and Default Content](https://cldr.unicode.org/development/updating-codes/likelysubtags-and-default-content) to add the new language and its associated subtags to common/supplemental/likelySubtags.xml
37	- Also add the English translation for any new languages in **common/main/en.xml**
38- If requested, add to vendor targets (Locale.txt), and to Cldr where resources are committed.
39- Run the tests (will be done automatically when a PR is created)
40- Commit your work to a branch and create a Pull Request.
41- The new locale will be included in Smoketest when the PR is merged, and will be in production once a push to production occurs.
42
43