Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJackson Harper <jackson@novell.com>2004-05-20 03:11:58 +0400
committerJackson Harper <jackson@novell.com>2004-05-20 03:11:58 +0400
commita236e9766f4cf0380da34697f1a3ff93b0fb4ed8 (patch)
tree1da33e88e8b8b9efcf8f4632ede861c632d51308 /tools
parent5459ad227ed081b61c4f5437f8e869fad0d24e0b (diff)
Add locale builder
svn path=/trunk/mono/; revision=27712
Diffstat (limited to 'tools')
-rw-r--r--tools/locale-builder/CultureInfoEntry.cs94
-rw-r--r--tools/locale-builder/DateTimeFormatEntry.cs97
-rw-r--r--tools/locale-builder/Driver.cs883
-rw-r--r--tools/locale-builder/Entry.cs41
-rw-r--r--tools/locale-builder/Makefile.am41
-rw-r--r--tools/locale-builder/NumberFormatEntry.cs117
-rwxr-xr-xtools/locale-builder/lcids.xml174
-rw-r--r--tools/locale-builder/supplementalData.xml968
8 files changed, 2415 insertions, 0 deletions
diff --git a/tools/locale-builder/CultureInfoEntry.cs b/tools/locale-builder/CultureInfoEntry.cs
new file mode 100644
index 00000000000..9a13d306f5b
--- /dev/null
+++ b/tools/locale-builder/CultureInfoEntry.cs
@@ -0,0 +1,94 @@
+//
+// Mono.Tools.LocaleBuilder.CultureInfoEntry
+//
+// Author(s):
+// Jackson Harper (jackson@ximian.com)
+//
+// (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+
+using System;
+using System.Text;
+
+namespace Mono.Tools.LocaleBuilder {
+
+ public class CultureInfoEntry : Entry {
+
+ public string Language;
+ public string Territory;
+ public string EnglishName;
+ public string DisplayName;
+ public string NativeName;
+ public string IcuName;
+ public string Win3Lang;
+ public string ISO2Lang;
+ public string ISO3Lang;
+ public string Lcid;
+ public string ParentLcid;
+ public string SpecificLcid;
+ public DateTimeFormatEntry DateTimeFormatEntry;
+ public NumberFormatEntry NumberFormatEntry;
+ public int [] CalendarData = new int [5];
+ public int DateTimeIndex;
+ public int NumberIndex;
+
+
+ public int Row;
+
+ public CultureInfoEntry ()
+ {
+ DateTimeFormatEntry = new DateTimeFormatEntry ();
+ NumberFormatEntry = new NumberFormatEntry ();
+ }
+
+ public string Name {
+ get {
+ if (Territory == null)
+ return Language;
+ return Language + "-" + Territory;
+ }
+ }
+
+ public override string ToString ()
+ {
+ StringBuilder builder = new StringBuilder ();
+ AppendTableRow (builder);
+ return builder.ToString ();
+ }
+
+ public void AppendTableRow (StringBuilder builder)
+ {
+ builder.Append ("\t{");
+ builder.AppendFormat ("{0}, {1}, {2}, " +
+ "\"{3}\", \"{4}\", \"{5}\", " +
+ "\"{6}\", \"{7}\", \"{8}\", " +
+ "\"{9}\", \"{10}\", " +
+ "{11}, " +
+ "{12}, {13}",
+ Lcid, ParentLcid, SpecificLcid,
+ EncodeString (Name), EncodeString (IcuName), EncodeString (EnglishName),
+ EncodeString (DisplayName), EncodeString (NativeName), EncodeString (Win3Lang),
+ EncodeString (ISO3Lang), EncodeString (ISO2Lang),
+ ValuesString (CalendarData),
+ DateTimeFormatEntry == null ? -1 : DateTimeFormatEntry.Row,
+ NumberFormatEntry == null ? -1 : NumberFormatEntry.Row);
+ builder.Append ('}');
+ }
+
+ private string ValuesString (int [] values)
+ {
+ StringBuilder builder = new StringBuilder ();
+ builder.Append ('{');
+ for (int i=0; i<values.Length; i++) {
+ builder.Append (values [i].ToString ());
+ if (i+1 < values.Length)
+ builder.Append (", ");
+ }
+ builder.Append ("}");
+ return builder.ToString ();
+ }
+ }
+
+}
+
diff --git a/tools/locale-builder/DateTimeFormatEntry.cs b/tools/locale-builder/DateTimeFormatEntry.cs
new file mode 100644
index 00000000000..c13f77ad83d
--- /dev/null
+++ b/tools/locale-builder/DateTimeFormatEntry.cs
@@ -0,0 +1,97 @@
+//
+// Mono.Tools.LocaleBuilder.DateTimeFormatEntry
+//
+// Author(s):
+// Jackson Harper (jackson@ximian.com)
+//
+// (C) 2004, Novell, Inc (http://www.novell.com)
+//
+
+
+using System;
+using System.Text;
+using System.Collections;
+
+namespace Mono.Tools.LocaleBuilder {
+
+ public class DateTimeFormatEntry : Entry {
+
+ public string CalendarType;
+ public ArrayList AbbreviatedDayNames = new ArrayList ();
+ public ArrayList AbbreviatedMonthNames = new ArrayList ();
+ public string AMDesignator;
+ public int CalendarWeekRule;
+ public string DateSeparator;
+ public ArrayList DayNames = new ArrayList ();
+ public int FirstDayOfWeek;
+ public string FullDateTimePattern;
+ public string LongDatePattern;
+ public string LongTimePattern;
+ public string MonthDayPattern;
+ public ArrayList MonthNames = new ArrayList ();
+ public string PMDesignator;
+ public string ShortDatePattern;
+ public string ShortTimePattern;
+ public string TimeSeparator;
+ public string YearMonthPattern;
+ public int [] OptionalCalendars = new int [5];
+
+ public int Row;
+
+ public void AppendTableRow (StringBuilder builder)
+ {
+ builder.Append ("\t{");
+ builder.Append ("\"" + EncodeString (FullDateTimePattern) + "\", ");
+ builder.Append ("\"" + EncodeString (LongDatePattern) + "\", ");
+ builder.Append ("\"" + EncodeString (ShortDatePattern) + "\", ");
+
+ builder.Append ("\"" + EncodeString (LongTimePattern) + "\", ");
+ builder.Append ("\"" + EncodeString (ShortTimePattern) + "\", ");
+
+ builder.Append ("\"" + EncodeString (YearMonthPattern) + "\", ");
+ builder.Append ("\"" + EncodeString (MonthDayPattern) + "\", ");
+
+ builder.Append ("\"" + EncodeString (AMDesignator) + "\", ");
+ builder.Append ("\"" + EncodeString (PMDesignator) + "\", ");
+
+ AppendNames (builder, DayNames);
+ builder.Append (", ");
+ AppendNames (builder, AbbreviatedDayNames);
+ builder.Append (", ");
+
+ AppendNames (builder, MonthNames);
+ builder.Append (", ");
+ AbbreviatedMonthNames.Add (String.Empty); /* ALLWAYS ?? */
+ AppendNames (builder, AbbreviatedMonthNames);
+ builder.Append (", ");
+
+ builder.Append (CalendarWeekRule + ", ");
+ builder.Append (FirstDayOfWeek + ", ");
+
+ builder.Append ("\"" + EncodeString (DateSeparator) + "\", ");
+ builder.Append ("\"" + EncodeString (TimeSeparator) + "\"");
+
+ builder.Append ('}');
+ }
+
+ public override string ToString ()
+ {
+ StringBuilder builder = new StringBuilder ();
+ AppendTableRow (builder);
+ return builder.ToString ();
+ }
+
+ private void AppendNames (StringBuilder builder, ArrayList names)
+ {
+ builder.Append ('{');
+ for (int i=0; i<names.Count; i++) {
+ builder.Append ("\"" + EncodeString (names [i].ToString ()) + "\"");
+ if (i+1 < names.Count)
+ builder.Append (", ");
+ }
+ builder.Append ("}");
+ }
+ }
+}
+
+
diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs
new file mode 100644
index 00000000000..27c4f15315e
--- /dev/null
+++ b/tools/locale-builder/Driver.cs
@@ -0,0 +1,883 @@
+//
+// Mono.Tools.LocalBuilder.Driver
+//
+// Author(s):
+// Jackson Harper (jackson@ximian.com)
+//
+// (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+
+using System;
+using System.IO;
+using System.Text;
+using System.Xml;
+using System.Xml.XPath;
+using System.Collections;
+using System.Globalization;
+using System.Text.RegularExpressions;
+
+namespace Mono.Tools.LocaleBuilder {
+
+ public class Driver {
+
+ public static void Main (string [] args)
+ {
+ Driver d = new Driver ();
+ ParseArgs (args, d);
+ d.Run ();
+ }
+
+ private static void ParseArgs (string [] args, Driver d)
+ {
+ for (int i = 0; i < args.Length; i++) {
+ if (args [i] == "--lang" && i+1 < args.Length)
+ d.Lang = args [++i];
+ else if (args [i] == "--locales" && i+1 < args.Length)
+ d.Locales = args [++i];
+ else if (args [i] == "--header" && i + 1 < args.Length)
+ d.HeaderFileName = args [++i];
+ }
+ }
+
+ private string lang;
+ private string locales;
+ private string header_name;
+ private ArrayList cultures;
+ private Hashtable langs;
+ private Hashtable currency_types;
+
+ // The lang is the language that display names will be displayed in
+ public string Lang {
+ get {
+ if (lang == null)
+ lang = "en";
+ return lang;
+ }
+ set { lang = value; }
+ }
+
+ public string Locales {
+ get { return locales; }
+ set { locales = value; }
+ }
+
+ public string HeaderFileName {
+ get {
+ if (header_name == null)
+ return "culture-info-tables.h";
+ return header_name;
+ }
+ set { header_name = value; }
+ }
+
+ public void Run ()
+ {
+ Regex locales_regex = null;
+ if (Locales != null)
+ locales_regex = new Regex (Locales);
+
+ langs = new Hashtable ();
+ cultures = new ArrayList ();
+
+ LookupCurrencyTypes ();
+
+ foreach (string file in Directory.GetFiles ("locales")) {
+ string fn = Path.GetFileNameWithoutExtension (file);
+ if (locales_regex == null || locales_regex.IsMatch (fn)) {
+ ParseLocale (fn);
+ }
+ }
+
+ /**
+ * Dump each table individually. Using StringBuilders
+ * because it is easier to debug, should switch to just
+ * writing to streams eventually.
+ */
+ using (StreamWriter writer = new StreamWriter (HeaderFileName, false, new UTF8Encoding (false, true))) {
+
+ writer.WriteLine ();
+ writer.WriteLine ("#ifndef MONO_METADATA_CULTURE_INFO_TABLES");
+ writer.WriteLine ("#define MONO_METADATA_CULTURE_INFO_TABLES 1");
+ writer.WriteLine ("\n");
+
+ writer.WriteLine ("#define NUM_CULTURE_ENTRIES " + cultures.Count);
+ writer.WriteLine ("\n");
+
+ // Sort the cultures by lcid
+ cultures.Sort (new LcidComparer ());
+
+ StringBuilder builder = new StringBuilder ();
+ int row = 0;
+ int count = cultures.Count;
+ for (int i = 0; i < count; i++) {
+ CultureInfoEntry ci = (CultureInfoEntry) cultures [i];
+ if (ci.DateTimeFormatEntry == null)
+ continue;
+ ci.DateTimeFormatEntry.AppendTableRow (builder);
+ ci.DateTimeFormatEntry.Row = row++;
+ if (i + 1 < count)
+ builder.Append (',');
+ builder.Append ('\n');
+ }
+
+ writer.WriteLine ("static const DateTimeFormatEntry datetime_format_entries [] = {");
+ writer.Write (builder);
+ writer.WriteLine ("};\n\n");
+
+ builder = new StringBuilder ();
+ row = 0;
+ for (int i=0; i < count; i++) {
+ CultureInfoEntry ci = (CultureInfoEntry) cultures [i];
+ if (ci.NumberFormatEntry == null)
+ continue;
+ ci.NumberFormatEntry.AppendTableRow (builder);
+ ci.NumberFormatEntry.Row = row++;
+ if (i + 1 < count)
+ builder.Append (',');
+ builder.Append ('\n');
+ }
+
+ writer.WriteLine ("static const NumberFormatEntry number_format_entries [] = {");
+ writer.Write (builder);
+ writer.WriteLine ("};\n\n");
+
+ builder = new StringBuilder ();
+ row = 0;
+ for (int i = 0; i < count; i++) {
+ CultureInfoEntry ci = (CultureInfoEntry) cultures [i];
+ ci.AppendTableRow (builder);
+ ci.Row = row++;
+ if (i + 1 < count)
+ builder.Append (',');
+ builder.Append ('\n');
+ }
+
+ writer.WriteLine ("static const CultureInfoEntry culture_entries [] = {");
+ writer.Write (builder);
+ writer.WriteLine ("};\n\n");
+
+ cultures.Sort (new NameComparer ()); // Sort based on name
+ builder = new StringBuilder ();
+ for (int i = 0; i < count; i++) {
+ CultureInfoEntry ci = (CultureInfoEntry) cultures [i];
+ builder.Append ("\t{\"" + ci.Name.ToLower () + "\", ");
+ builder.Append (ci.Row + "}");
+ if (i + 1 < count)
+ builder.Append (',');
+ builder.Append ('\n');
+ }
+
+ writer.WriteLine ("static const CultureInfoNameEntry culture_name_entries [] = {");
+ writer.Write (builder);
+ writer.WriteLine ("};\n\n");
+
+ writer.WriteLine ("#endif\n");
+ }
+ }
+
+ private bool ParseLang (string lang)
+ {
+ XPathDocument doc = new XPathDocument (Path.Combine ("langs", lang + ".xml"));
+ XPathNavigator nav = doc.CreateNavigator ();
+ CultureInfoEntry ci = new CultureInfoEntry ();
+ string lang_type, terr_type;
+
+// ci.Name = lang; // TODO: might need to be mapped.
+
+ lang_type = nav.Evaluate ("string (ldml/identity/language/@type)").ToString ();
+ terr_type = nav.Evaluate ("string (ldml/identity/territory/@type)").ToString ();
+
+ ci.Language = (lang_type == String.Empty ? null : lang_type);
+ ci.Territory = (terr_type == String.Empty ? null : terr_type);
+
+ if (!LookupLcids (ci))
+ return false;
+
+ doc = new XPathDocument (Path.Combine ("langs", Lang + ".xml"));
+ nav = doc.CreateNavigator ();
+ ci.DisplayName = LookupFullName (ci, nav);
+
+ if (Lang == "en") {
+ ci.EnglishName = ci.DisplayName;
+ } else {
+ doc = new XPathDocument (Path.Combine ("langs", Lang + ".xml"));
+ nav = doc.CreateNavigator ();
+ ci.EnglishName = LookupFullName (ci, nav);
+ }
+
+ if (ci.Language == Lang) {
+ ci.NativeName = ci.DisplayName;
+ } else {
+ doc = new XPathDocument (Path.Combine ("langs", lang + ".xml"));
+ nav = doc.CreateNavigator ();
+ ci.NativeName = LookupFullName (ci, nav);
+ }
+
+ // Null these out because langs dont have them
+ ci.DateTimeFormatEntry = null;
+ ci.NumberFormatEntry = null;
+
+ langs [lang] = ci;
+ cultures.Add (ci);
+
+ return true;
+ }
+
+ private void ParseLocale (string locale)
+ {
+ CultureInfoEntry ci;
+
+ ci = LookupCulture (locale);
+
+ if (ci == null)
+ return;
+
+ if (langs [ci.Language] == null) {
+ if (!ParseLang (ci.Language)) // If we can't parse the lang we cant have the locale
+ return;
+ }
+
+ cultures.Add (ci);
+ }
+
+ private CultureInfoEntry LookupCulture (string locale)
+ {
+ XPathDocument doc = new XPathDocument (Path.Combine ("locales", locale + ".xml"));
+ XPathNavigator nav = doc.CreateNavigator ();
+ CultureInfoEntry ci = new CultureInfoEntry ();
+ string supp;
+
+// ci.Name = locale; // TODO: Some of these need to be mapped.
+
+ // First thing we do is get the lang-territory combo, lcid, and full names
+ ci.Language = nav.Evaluate ("string (ldml/identity/language/@type)").ToString ();
+ ci.Territory = nav.Evaluate ("string (ldml/identity/territory/@type)").ToString ();
+
+ if (!LookupLcids (ci))
+ return null;
+ LookupNames (ci);
+
+ /**
+ * Locale generation is done in six steps, first we
+ * read the root file which is the base invariant data
+ * then the supplemental root data,
+ * then the language file, the supplemental languages
+ * file then the locale file, then the supplemental
+ * locale file. Values in each descending file can
+ * overwrite previous values.
+ */
+ doc = new XPathDocument (Path.Combine ("langs", "root.xml"));
+ nav = doc.CreateNavigator ();
+ Lookup (nav, ci);
+
+ doc = new XPathDocument (Path.Combine ("supp", "root.xml"));
+ nav = doc.CreateNavigator ();
+ Lookup (nav, ci);
+
+ doc = new XPathDocument (Path.Combine ("langs", ci.Language + ".xml"));
+ nav = doc.CreateNavigator ();
+ Lookup (nav, ci);
+
+ supp = Path.Combine ("supp", ci.Language + ".xml");
+ if (File.Exists (supp)) {
+ doc = new XPathDocument (supp);
+ nav = doc.CreateNavigator ();
+ Lookup (nav, ci);
+ }
+
+ doc = new XPathDocument (Path.Combine ("locales", locale + ".xml"));
+ nav = doc.CreateNavigator ();
+ Lookup (nav, ci);
+
+ supp = Path.Combine ("supp", locale + ".xml");
+ if (File.Exists (supp)) {
+ doc = new XPathDocument (supp);
+ nav = doc.CreateNavigator ();
+ Lookup (nav, ci);
+ }
+
+ return ci;
+ }
+
+ private void Lookup (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ LookupDateTimeInfo (nav, ci);
+ LookupNumberInfo (nav, ci);
+ }
+
+ private void LookupNames (CultureInfoEntry ci)
+ {
+ XPathDocument doc = new XPathDocument (Path.Combine ("langs", Lang + ".xml"));
+ XPathNavigator nav = doc.CreateNavigator ();
+
+ ci.DisplayName = LookupFullName (ci, nav);
+
+ if (Lang == "en") {
+ ci.EnglishName = ci.DisplayName;
+ } else {
+ doc = new XPathDocument (Path.Combine ("langs", "en.xml"));
+ nav = doc.CreateNavigator ();
+ ci.EnglishName = LookupFullName (ci, nav);
+ }
+
+ if (ci.Language == Lang) {
+ ci.NativeName = ci.DisplayName;
+ } else {
+ doc = new XPathDocument (Path.Combine ("langs", ci.Language + ".xml"));
+ nav = doc.CreateNavigator ();
+ ci.NativeName = LookupFullName (ci, nav);
+ }
+ }
+
+ private void LookupDateTimeInfo (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ /**
+ * TODO: Does anyone have multiple calendars?
+ */
+ XPathNodeIterator ni =(XPathNodeIterator) nav.Evaluate ("ldml/dates/calendars/calendar");
+
+ while (ni.MoveNext ()) {
+ DateTimeFormatEntry df = ci.DateTimeFormatEntry;
+ string cal_type = ni.Current.GetAttribute ("type", String.Empty);
+
+ if (cal_type != String.Empty)
+ df.CalendarType = cal_type;
+
+ XPathNodeIterator ni2 = (XPathNodeIterator) ni.Current.Evaluate ("optionalCalendars/calendar");
+ int opt_cal_count = 0;
+ while (ni2.MoveNext ()) {
+ int type;
+ string greg_type_str;
+ XPathNavigator df_nav = ni2.Current;
+ switch (df_nav.GetAttribute ("type", String.Empty)) {
+ case "Gregorian":
+ type = 0;
+ break;
+ case "Hijri":
+ type = 0x01;
+ break;
+ case "ThaiBuddhist":
+ type = 0x02;
+ break;
+ default:
+ Console.WriteLine ("unknown calendar type: " +
+ df_nav.GetAttribute ("type", String.Empty));
+ continue;
+ }
+ type <<= 24;
+ greg_type_str = df_nav.GetAttribute ("greg_type", String.Empty);
+ if (greg_type_str != null && greg_type_str != String.Empty) {
+ GregorianCalendarTypes greg_type = (GregorianCalendarTypes)
+ Enum.Parse (typeof (GregorianCalendarTypes), greg_type_str);
+ int greg_type_int = (int) greg_type;
+ type |= greg_type_int;
+
+ }
+ Console.WriteLine ("Setting cal type: {0:X} for {1}", type, ci.Name);
+ ci.CalendarData [opt_cal_count++] = type;
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("monthNames/month");
+ while (ni2.MoveNext ()) {
+ if (ni2.CurrentPosition == 1)
+ df.MonthNames.Clear ();
+ df.MonthNames.Add (ni2.Current.Value);
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("dayNames/day");
+ while (ni2.MoveNext ()) {
+ if (ni2.CurrentPosition == 1)
+ df.DayNames.Clear ();
+ df.DayNames.Add (ni2.Current.Value);
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("dayAbbr/day");
+ while (ni2.MoveNext ()) {
+ if (ni2.CurrentPosition == 1)
+ df.AbbreviatedDayNames.Clear ();
+ df.AbbreviatedDayNames.Add (ni2.Current.Value);
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("monthAbbr/month");
+ while (ni2.MoveNext ()) {
+ if (ni2.CurrentPosition == 1)
+ df.AbbreviatedMonthNames.Clear ();
+ df.AbbreviatedMonthNames.Add (ni2.Current.Value);
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("dateFormats/dateFormatLength");
+ while (ni2.MoveNext ()) {
+ XPathNavigator df_nav = ni2.Current;
+ switch (df_nav.GetAttribute ("type", String.Empty)) {
+ case "full":
+ ParseFullDateFormat (df, df_nav.Value);
+ break;
+ case "long":
+ df.LongDatePattern = df_nav.Value;
+ break;
+ case "short":
+ df.ShortDatePattern = df_nav.Value;
+ break;
+ case "year_month":
+ df.YearMonthPattern = df_nav.Value;
+ break;
+ case "month_day":
+ df.MonthDayPattern = df_nav.Value;
+ break;
+ }
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("timeFormats/timeFormatLength");
+ while (ni2.MoveNext ()) {
+ XPathNavigator df_nav = ni2.Current;
+ switch (df_nav.GetAttribute ("type", String.Empty)) {
+ case "long":
+ df.LongTimePattern = df_nav.Value.Replace ('a', 't');
+ break;
+ case "short":
+ df.ShortTimePattern = df_nav.Value.Replace ('a', 't');
+ break;
+ }
+ }
+
+ ni2 = (XPathNodeIterator) ni.Current.Evaluate ("dateTimeFormats/dateTimeFormatLength/dateTimeFormat/pattern");
+ if (ni2.MoveNext ())
+ df.FullDateTimePattern = String.Format (ni2.Current.ToString (),
+ df.LongTimePattern, df.LongDatePattern);
+
+ string am = (string) ni.Current.Evaluate ("string(am)");
+ string pm = (string) ni.Current.Evaluate ("string(pm)");
+
+ if (am != String.Empty)
+ df.AMDesignator = am;
+ if (pm != String.Empty)
+ df.PMDesignator = pm;
+ }
+
+ string date_sep = (string) nav.Evaluate ("string(ldml/dates/symbols/dateSeparator)");
+ string time_sep = (string) nav.Evaluate ("string(ldml/dates/symbols/timeSeparator)");
+
+ if (date_sep != String.Empty)
+ ci.DateTimeFormatEntry.DateSeparator = date_sep;
+ if (time_sep != String.Empty)
+ ci.DateTimeFormatEntry.TimeSeparator = time_sep;
+ }
+
+ private void LookupNumberInfo (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ XPathNodeIterator ni =(XPathNodeIterator) nav.Evaluate ("ldml/numbers");
+
+ while (ni.MoveNext ()) {
+ LookupNumberSymbols (ni.Current, ci);
+ LookupDecimalFormat (ni.Current, ci);
+ LookupPercentFormat (ni.Current, ci);
+ LookupCurrencyFormat (ni.Current, ci);
+ LookupCurrencySymbol (ni.Current, ci);
+ }
+ }
+
+ private void LookupDecimalFormat (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ string format = (string) nav.Evaluate ("string(decimalFormats/" +
+ "decimalFormatLength/decimalFormat/pattern)");
+
+ if (format == String.Empty)
+ return;
+
+ string [] part_one, part_two;
+ string [] pos_neg = format.Split (new char [1] {';'}, 2);
+
+ if (pos_neg.Length == 2) {
+
+ part_one = pos_neg [0].Split (new char [1] {'.'}, 2);
+
+ if (part_one.Length == 2) {
+ // assumed same for both positive and negative
+ // decimal digit side
+ ci.NumberFormatEntry.NumberDecimalDigits = 0;
+ for (int i = 0; i < part_one [1].Length; i++) {
+ if (part_one [1][i] == '#') {
+ ci.NumberFormatEntry.NumberDecimalDigits ++;
+ } else
+ break;
+ }
+
+ // decimal grouping side
+ part_two = part_one [0].Split (',');
+ if (part_two.Length > 1) {
+ int len = part_two.Length - 1;
+ ci.NumberFormatEntry.NumberGroupSizes = new int [len];
+ for (int i = 0; i < len; i++) {
+ string pat = part_two [i + 1];
+ ci.NumberFormatEntry.NumberGroupSizes [i] = pat.Length;
+ }
+ } else {
+ ci.NumberFormatEntry.NumberGroupSizes = new int [1] { 0 };
+ }
+
+ if (pos_neg [1].StartsWith ("(") && pos_neg [1].EndsWith (")")) {
+ ci.NumberFormatEntry.NumberNegativePattern = 0;
+ } else if (pos_neg [1].StartsWith ("- ")) {
+ ci.NumberFormatEntry.NumberNegativePattern = 2;
+ } else if (pos_neg [1].StartsWith ("-")) {
+ ci.NumberFormatEntry.NumberNegativePattern = 1;
+ } else if (pos_neg [1].EndsWith (" -")) {
+ ci.NumberFormatEntry.NumberNegativePattern = 4;
+ } else if (pos_neg [1].EndsWith ("-")) {
+ ci.NumberFormatEntry.NumberNegativePattern = 3;
+ } else {
+ ci.NumberFormatEntry.NumberNegativePattern = 1;
+ }
+ }
+ }
+ }
+
+ private void LookupPercentFormat (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ string format = (string) nav.Evaluate ("string(percentFormats/" +
+ "percentFormatLength/percentFormat/pattern)");
+
+ if (format == String.Empty)
+ return;
+
+ string [] part_one, part_two;
+
+ // we don't have percentNegativePattern in CLDR so
+ // the percentNegativePattern are just guesses
+ if (format.StartsWith ("%")) {
+ ci.NumberFormatEntry.PercentPositivePattern = 2;
+ ci.NumberFormatEntry.PercentNegativePattern = 2;
+ } else if (format.EndsWith (" %")) {
+ ci.NumberFormatEntry.PercentPositivePattern = 0;
+ ci.NumberFormatEntry.PercentNegativePattern = 0;
+ } else if (format.EndsWith ("%")) {
+ ci.NumberFormatEntry.PercentPositivePattern = 1;
+ ci.NumberFormatEntry.PercentNegativePattern = 1;
+ } else {
+ ci.NumberFormatEntry.PercentPositivePattern = 0;
+ ci.NumberFormatEntry.PercentNegativePattern = 0;
+ }
+
+ part_one = format.Split (new char [1] {'.'}, 2);
+
+ if (part_one.Length == 2) {
+ // assumed same for both positive and negative
+ // decimal digit side
+ ci.NumberFormatEntry.PercentDecimalDigits = 0;
+ for (int i = 0; i < part_one [1].Length; i++) {
+ if (part_one [1][i] == '#')
+ ci.NumberFormatEntry.PercentDecimalDigits++;
+ else
+ break;
+ }
+
+ // percent grouping side
+ part_two = part_one [0].Split (',');
+ if (part_two.Length > 1) {
+ int len = part_two.Length - 1;
+ ci.NumberFormatEntry.PercentGroupSizes = new int [len];
+ for (int i = 0; i < len; i++) {
+ string pat = part_two [i + 1];
+ ci.NumberFormatEntry.PercentGroupSizes [i] = pat.Length;
+ }
+ } else {
+ ci.NumberFormatEntry.PercentGroupSizes = new int [1] { 0 };
+ }
+ }
+ }
+
+ private void LookupCurrencyFormat (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ string format = (string) nav.Evaluate ("string(currencyFormats/" +
+ "currencyFormatLength/currencyFormat/pattern)");
+
+ if (format == String.Empty)
+ return;
+
+ string [] part_one, part_two;
+ string [] pos_neg = format.Split (new char [1] {';'}, 2);
+
+ pos_neg = format.Split (new char [1] {';'}, 2);
+ if (pos_neg.Length == 2) {
+ part_one = pos_neg [0].Split (new char [1] {'.'}, 2);
+
+ if (part_one.Length == 2) {
+ // assumed same for both positive and negative
+ // decimal digit side
+ ci.NumberFormatEntry.CurrencyDecimalDigits = 0;
+ for (int i = 0; i < part_one [1].Length; i++) {
+ if (part_one [1][i] == '0')
+ ci.NumberFormatEntry.CurrencyDecimalDigits++;
+ else
+ break;
+ }
+
+ // decimal grouping side
+ part_two = part_one [0].Split (',');
+ if (part_two.Length > 1) {
+ int len = part_two.Length - 1;
+ ci.NumberFormatEntry.CurrencyGroupSizes = new int [len];
+ for (int i = 0; i < len; i++) {
+ string pat = part_two [i + 1];
+ ci.NumberFormatEntry.CurrencyGroupSizes [i] = pat.Length;
+ }
+ } else {
+ ci.NumberFormatEntry.CurrencyGroupSizes = new int [1] { 0 };
+ }
+
+ if (pos_neg [1].StartsWith ("(\u00a4 ") && pos_neg [1].EndsWith (")")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 14;
+ } else if (pos_neg [1].StartsWith ("(\u00a4") && pos_neg [1].EndsWith (")")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 0;
+ } else if (pos_neg [1].StartsWith ("\u00a4 ") && pos_neg [1].EndsWith ("-")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 11;
+ } else if (pos_neg [1].StartsWith ("\u00a4") && pos_neg [1].EndsWith ("-")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 3;
+ } else if (pos_neg [1].StartsWith ("(") && pos_neg [1].EndsWith (" \u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 15;
+ } else if (pos_neg [1].StartsWith ("(") && pos_neg [1].EndsWith ("\u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 4;
+ } else if (pos_neg [1].StartsWith ("-") && pos_neg [1].EndsWith (" \u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 8;
+ } else if (pos_neg [1].StartsWith ("-") && pos_neg [1].EndsWith ("\u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 5;
+ } else if (pos_neg [1].StartsWith ("-\u00a4 ")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 9;
+ } else if (pos_neg [1].StartsWith ("-\u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 1;
+ } else if (pos_neg [1].StartsWith ("\u00a4 -")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 12;
+ } else if (pos_neg [1].StartsWith ("\u00a4-")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 2;
+ } else if (pos_neg [1].EndsWith (" \u00a4-")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 10;
+ } else if (pos_neg [1].EndsWith ("\u00a4-")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 7;
+ } else if (pos_neg [1].EndsWith ("- \u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 13;
+ } else if (pos_neg [1].EndsWith ("-\u00a4")) {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 6;
+ } else {
+ ci.NumberFormatEntry.CurrencyNegativePattern = 0;
+ }
+
+ if (pos_neg [0].StartsWith ("\u00a4 ")) {
+ ci.NumberFormatEntry.CurrencyPositivePattern = 2;
+ } else if (pos_neg [0].StartsWith ("\u00a4")) {
+ ci.NumberFormatEntry.CurrencyPositivePattern = 0;
+ } else if (pos_neg [0].EndsWith (" \u00a4")) {
+ ci.NumberFormatEntry.CurrencyPositivePattern = 3;
+ } else if (pos_neg [0].EndsWith ("\u00a4")) {
+ ci.NumberFormatEntry.CurrencyPositivePattern = 1;
+ } else {
+ ci.NumberFormatEntry.CurrencyPositivePattern = 0;
+ }
+ }
+ }
+ }
+
+ private void LookupNumberSymbols (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ string dec = (string) nav.Evaluate ("string(symbols/decimal)");
+ string group = (string) nav.Evaluate ("string(symbols/group)");
+ string percent = (string) nav.Evaluate ("string(symbols/percentSign)");
+ string positive = (string) nav.Evaluate ("string(symbols/plusSign)");
+ string negative = (string) nav.Evaluate ("string(symbols/minusSign)");
+ string per_mille = (string) nav.Evaluate ("string(symbols/perMille)");
+ string infinity = (string) nav.Evaluate ("string(symbols/infinity)");
+ string nan = (string) nav.Evaluate ("string(symbols/nan)");
+
+ if (dec != String.Empty) {
+ ci.NumberFormatEntry.NumberDecimalSeparator = dec;
+ ci.NumberFormatEntry.PercentDecimalSeparator = dec;
+ ci.NumberFormatEntry.CurrencyDecimalSeparator = dec;
+ }
+
+ if (group != String.Empty) {
+ ci.NumberFormatEntry.NumberGroupSeparator = group;
+ ci.NumberFormatEntry.PercentGroupSeparator = group;
+ ci.NumberFormatEntry.CurrencyGroupSeparator = group;
+ }
+
+ if (percent != String.Empty)
+ ci.NumberFormatEntry.PercentSymbol = percent;
+ if (positive != String.Empty)
+ ci.NumberFormatEntry.PositiveSign = positive;
+ if (negative != String.Empty)
+ ci.NumberFormatEntry.NegativeSign = negative;
+ if (per_mille != String.Empty)
+ ci.NumberFormatEntry.PerMilleSymbol = per_mille;
+ if (infinity != String.Empty)
+ ci.NumberFormatEntry.PositiveInfinitySymbol = infinity;
+ if (nan != String.Empty)
+ ci.NumberFormatEntry.NaNSymbol = nan;
+ }
+
+ private void LookupCurrencySymbol (XPathNavigator nav, CultureInfoEntry ci)
+ {
+ string type = currency_types [ci.Territory] as string;
+
+ if (type == null) {
+ Console.WriteLine ("no currency type for: " + ci.Territory);
+ return;
+ }
+
+ string cur = (string) nav.Evaluate ("string(currencies/currency [@type='" +
+ type + "']/symbol)");
+
+ if (cur != String.Empty)
+ ci.NumberFormatEntry.CurrencySymbol = cur;
+ }
+
+ private bool LookupLcids (CultureInfoEntry ci)
+ {
+ XPathDocument doc = new XPathDocument ("lcids.xml");
+ XPathNavigator nav = doc.CreateNavigator ();
+ string name = ci.Language;
+
+ if (ci.Territory != null)
+ name += "-" + ci.Territory;
+
+ XPathNodeIterator ni =(XPathNodeIterator) nav.Evaluate ("lcids/lcid[@name='"
+ + name + "']");
+ if (!ni.MoveNext ()) {
+ string file;
+ if (ci.Territory != null) {
+ file = Path.Combine ("locales", ci.Language + "_" + ci.Territory + ".xml");
+ File.Delete (file);
+ Console.WriteLine ("deleting file: " + file);
+ }
+ Console.WriteLine ("no lcid found for: " + name);
+ return false;
+ }
+
+ string id = ni.Current.GetAttribute ("id", String.Empty);
+ string parent = ni.Current.GetAttribute ("parent", String.Empty);
+ string specific = ni.Current.GetAttribute ("specific", String.Empty);
+ string iso2 = ni.Current.GetAttribute ("iso2", String.Empty);
+ string iso3 = ni.Current.GetAttribute ("iso3", String.Empty);
+ string win = ni.Current.GetAttribute ("win", String.Empty);
+ string icu = ni.Current.GetAttribute ("icu_name", String.Empty);
+
+ // lcids are in 0x<hex> format
+ ci.Lcid = id;
+ ci.ParentLcid = parent;
+ ci.SpecificLcid = specific;
+ ci.ISO2Lang = iso2;
+ ci.ISO3Lang = iso3;
+ ci.Win3Lang = win;
+ ci.IcuName = icu;
+
+ return true;
+ }
+
+ private string LookupFullName (CultureInfoEntry ci, XPathNavigator nav)
+ {
+ string pre = "ldml/localeDisplayNames/";
+ string ret;
+
+ ret = (string) nav.Evaluate ("string("+
+ pre + "languages/language[@type='" + ci.Language + "'])");
+
+ if (ci.Territory == null)
+ return ret;
+ ret += " (" + (string) nav.Evaluate ("string("+
+ pre + "territories/territory[@type='" + ci.Territory + "'])") + ")";
+
+ return ret;
+ }
+
+ private void LookupCurrencyTypes ()
+ {
+ XPathDocument doc = new XPathDocument ("supplementalData.xml");
+ XPathNavigator nav = doc.CreateNavigator ();
+
+ currency_types = new Hashtable ();
+
+ XPathNodeIterator ni =(XPathNodeIterator) nav.Evaluate ("supplementalData/currencyData/region");
+ while (ni.MoveNext ()) {
+ string territory = (string) ni.Current.GetAttribute ("iso3166", String.Empty);
+ string currency = (string) ni.Current.Evaluate ("string(currency/@iso4217)");
+ currency_types [territory] = currency;
+ }
+ }
+
+ static string control_chars = "ghmsftz";
+
+ // HACK: We are trying to build year_month and month_day patterns from the full pattern.
+ private void ParseFullDateFormat (DateTimeFormatEntry df, string full)
+ {
+
+ string month_day = String.Empty;
+ string year_month = String.Empty;
+ bool in_month_data = false;
+ bool in_year_data = false;
+ int month_end = 0;
+ int year_end = 0;
+
+ for (int i = 0; i < full.Length; i++) {
+ char c = full [i];
+ if (c == 'M') {
+ month_day += c;
+ year_month += c;
+ in_year_data = true;
+ in_month_data = true;
+ month_end = month_day.Length;
+ year_end = year_month.Length;
+ } else if (Char.ToLower (c) == 'd') {
+ month_day += c;
+ in_month_data = true;
+ in_year_data = false;
+ month_end = month_day.Length;
+ } else if (Char.ToLower (c) == 'y') {
+ year_month += c;
+ in_year_data = true;
+ in_month_data = false;
+ year_end = year_month.Length;
+ } else if (control_chars.IndexOf (Char.ToLower (c)) >= 0) {
+ in_year_data = false;
+ in_month_data = false;
+ } else if (in_year_data || in_month_data) {
+ if (in_month_data)
+ month_day += c;
+ if (in_year_data)
+ year_month += c;
+ }
+ }
+
+ if (month_day != String.Empty) {
+ month_day = month_day.Substring (0, month_end);
+ df.MonthDayPattern = month_day;
+ }
+ if (year_month != String.Empty) {
+ year_month = year_month.Substring (0, year_end);
+ df.YearMonthPattern = year_month;
+ }
+ }
+
+ private class LcidComparer : IComparer {
+
+ public int Compare (object a, object b)
+ {
+ CultureInfoEntry aa = (CultureInfoEntry) a;
+ CultureInfoEntry bb = (CultureInfoEntry) b;
+
+ return aa.Lcid.CompareTo (bb.Lcid);
+ }
+ }
+
+ private class NameComparer : IComparer {
+
+ public int Compare (object a, object b)
+ {
+ CultureInfoEntry aa = (CultureInfoEntry) a;
+ CultureInfoEntry bb = (CultureInfoEntry) b;
+
+ return aa.Name.ToLower ().CompareTo (bb.Name.ToLower ());
+ }
+ }
+ }
+}
+
+
diff --git a/tools/locale-builder/Entry.cs b/tools/locale-builder/Entry.cs
new file mode 100644
index 00000000000..15d9a59f436
--- /dev/null
+++ b/tools/locale-builder/Entry.cs
@@ -0,0 +1,41 @@
+//
+//
+//
+
+using System;
+using System.Text;
+
+namespace Mono.Tools.LocaleBuilder {
+
+ public class Entry {
+
+ protected static String EncodeString (string str)
+ {
+ if (str == null)
+ return String.Empty;
+
+ StringBuilder ret = new StringBuilder ();
+ byte [] ba = new UTF8Encoding ().GetBytes (str);
+ bool in_hex = false;
+ foreach (byte b in ba) {
+ if (b > 127 || (in_hex && is_hex (b))) {
+ ret.AppendFormat ("\\x{0:x}", b);
+ in_hex = true;
+ } else {
+ ret.Append ((char) b);
+ in_hex = false;
+ }
+ }
+ return ret.ToString ();
+ }
+
+ private static bool is_hex (int e)
+ {
+ return (e >= '0' && e <= '9') || (e >= 'A' && e <= 'F') || (e >= 'a' && e <= 'f');
+ }
+ }
+}
+
+
+
+
diff --git a/tools/locale-builder/Makefile.am b/tools/locale-builder/Makefile.am
new file mode 100644
index 00000000000..d797b448ccf
--- /dev/null
+++ b/tools/locale-builder/Makefile.am
@@ -0,0 +1,41 @@
+
+MCS = mcs
+RUNTIME = mono
+MCSFLAGS = -g
+
+CLEANFILES = locale-builder.exe
+
+locale_builder_sources = Driver.cs \
+ CultureInfoEntry.cs \
+ DateTimeFormatEntry.cs \
+ NumberFormatEntry.cs \
+ Entry.cs
+
+supp_data_files = supp/ar_AE.xml supp/ar_EG.xml supp/ar_KW.xml supp/ar_MA.xml \
+ supp/ar_YE.xml supp/en_PH.xml supp/en_ZA.xml supp/th.xml \
+ supp/ar_IQ.xml supp/ar_LB.xml supp/ar_OM.xml supp/ar_TN.xml \
+ supp/en_US.xml supp/en_ZW.xml supp/ar_DZ.xml supp/ar_JO.xml \
+ supp/ar_QA.xml supp/ar.xml supp/en_IE.xml supp/en.xml \
+ supp/ar_SY.xml supp/ar_BH.xml supp/en_CA.xml supp/ar_LY.xml \
+ supp/root.xml
+
+EXTRA_DIST = $(locale_builder_sources) $(supp_data_files) lcids.xml supplementalData.xml
+
+locale-builder.exe: $(locale_builder_sources)
+ $(MCS) $(MCSFLAGS) /out:$@ $^
+
+culture-table: locale-builder.exe lang-data locale-data
+ $(RUNTIME) locale-builder.exe
+
+lang-data:
+ if ! test -f langs/en.xml ; then \
+ wget http://primates.ximian.com/~jackson/icu_langs.tar.gz ; \
+ fi
+
+locale-data:
+ if ! test -f locales/en_US.xml ; then \
+ wget http://primates.ximian.com/~jackson/icu_locales.tar.gz ; \
+ fi
+
+install-culture-table: culture-table
+ cp -f culture-info-tables.h ../../mono/metadata/. \ No newline at end of file
diff --git a/tools/locale-builder/NumberFormatEntry.cs b/tools/locale-builder/NumberFormatEntry.cs
new file mode 100644
index 00000000000..2d72028771a
--- /dev/null
+++ b/tools/locale-builder/NumberFormatEntry.cs
@@ -0,0 +1,117 @@
+//
+// Mono.Tools.LocaleBuilder.NumberFormatEntry
+//
+// Author(s):
+// Jackson Harper (jackson@ximian.com)
+//
+// (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+
+using System;
+using System.Text;
+
+namespace Mono.Tools.LocaleBuilder {
+
+ public class NumberFormatEntry : Entry {
+
+ public static readonly int MaxGroupSize = 5;
+
+ public int CurrencyDecimalDigits;
+ public string CurrencyDecimalSeparator;
+ public string CurrencyGroupSeparator;
+ public int [] CurrencyGroupSizes;
+ public int CurrencyNegativePattern;
+ public int CurrencyPositivePattern;
+ public string CurrencySymbol;
+ public string NaNSymbol;
+ public string NegativeSign;
+ public int NumberDecimalDigits;
+ public string NumberDecimalSeparator;
+ public string NumberGroupSeparator;
+ public int [] NumberGroupSizes;
+ public int NumberNegativePattern;
+ public int PercentDecimalDigits;
+ public string PercentDecimalSeparator;
+ public string PercentGroupSeparator;
+ public int [] PercentGroupSizes;
+ public int PercentNegativePattern;
+ public int PercentPositivePattern;
+ public string PercentSymbol;
+ public string PerMilleSymbol;
+ public string PositiveInfinitySymbol;
+ public string PositiveSign;
+
+ public int Row;
+
+ public string NegativeInfinitySymbol {
+ get {
+ return NegativeSign + PositiveInfinitySymbol;
+ }
+ }
+
+ public void AppendTableRow (StringBuilder builder)
+ {
+ builder.Append ("\t{");
+
+ builder.Append ("\"" + EncodeString (CurrencyDecimalSeparator) + "\", ");
+ builder.Append ("\"" + EncodeString (CurrencyGroupSeparator) + "\", ");
+ builder.Append ("\"" + EncodeString (PercentDecimalSeparator) + "\", ");
+ builder.Append ("\"" + EncodeString (PercentGroupSeparator) + "\", ");
+ builder.Append ("\"" + EncodeString (NumberDecimalSeparator) + "\", ");
+ builder.Append ("\"" + EncodeString (NumberGroupSeparator) + "\", ");
+
+ builder.Append ("\"" + EncodeString (CurrencySymbol) + "\", ");
+ builder.Append ("\"" + EncodeString (PercentSymbol) + "\", ");
+ builder.Append ("\"" + EncodeString (NaNSymbol) + "\", ");
+ builder.Append ("\"" + EncodeString (PerMilleSymbol) + "\", ");
+ builder.Append ("\"" + EncodeString (NegativeInfinitySymbol) + "\", ");
+ builder.Append ("\"" + EncodeString (PositiveInfinitySymbol) + "\", ");
+
+ builder.Append ("\"" + EncodeString (NegativeSign) + "\", ");
+ builder.Append ("\"" + EncodeString (PositiveSign) + "\", ");
+
+ builder.Append (CurrencyNegativePattern + ", ");
+ builder.Append (CurrencyPositivePattern + ", ");
+ builder.Append (PercentNegativePattern + ", ");
+ builder.Append (PercentPositivePattern + ", ");
+ builder.Append (NumberNegativePattern + ", ");
+
+ builder.Append (CurrencyDecimalDigits + ", ");
+ builder.Append (PercentDecimalDigits + ", ");
+ builder.Append (NumberDecimalDigits + ", ");
+
+ AppendGroupSizes (builder, CurrencyGroupSizes);
+ builder.Append (", ");
+ AppendGroupSizes (builder, PercentGroupSizes);
+ builder.Append (", ");
+ AppendGroupSizes (builder, NumberGroupSizes);
+
+ builder.Append ('}');
+ }
+
+ private void AppendGroupSizes (StringBuilder builder, int [] gs)
+ {
+ int len = (gs == null ? 0 : gs.Length);
+
+ builder.Append ('{');
+ for (int i = 0; i < MaxGroupSize; i++) {
+ if (i < len)
+ builder.Append (gs [0]);
+ else
+ builder.Append (-1);
+ if (i+1 < MaxGroupSize)
+ builder.Append (", ");
+ }
+ builder.Append ('}');
+ }
+
+ public override string ToString ()
+ {
+ StringBuilder builder = new StringBuilder ();
+ AppendTableRow (builder);
+ return builder.ToString ();
+ }
+ }
+}
+
diff --git a/tools/locale-builder/lcids.xml b/tools/locale-builder/lcids.xml
new file mode 100755
index 00000000000..c57f7e6c6ad
--- /dev/null
+++ b/tools/locale-builder/lcids.xml
@@ -0,0 +1,174 @@
+<lcids>
+ <lcid name="ar" id="0x0001" parent="0x007F" specific="0x0401" iso2="ar" iso3="ara" win="ARA" icu_name="Arabic" />
+ <lcid name="bg" id="0x0002" parent="0x007F" specific="0x0402" iso2="bg" iso3="bul" win="BGR" icu_name="Bulgarian" />
+ <lcid name="ca" id="0x0003" parent="0x007F" specific="0x0403" iso2="ca" iso3="cat" win="CAT" icu_name="Catalan" />
+ <lcid name="zh-CHS" id="0x0004" parent="0x007F" specific="0x0000" iso2="zh" iso3="zho" win="CHS" icu_name="Chinese" />
+ <lcid name="cs" id="0x0005" parent="0x007F" specific="0x0405" iso2="cs" iso3="ces" win="CSY" icu_name="Czech" />
+ <lcid name="da" id="0x0006" parent="0x007F" specific="0x0406" iso2="da" iso3="dan" win="DAN" icu_name="Danish" />
+ <lcid name="de" id="0x0007" parent="0x007F" specific="0x0407" iso2="de" iso3="deu" win="DEU" icu_name="German" />
+ <lcid name="el" id="0x0008" parent="0x007F" specific="0x0408" iso2="el" iso3="ell" win="ELL" icu_name="Greek" />
+ <lcid name="en" id="0x0009" parent="0x007F" specific="0x0409" iso2="en" iso3="eng" win="ENU" icu_name="English" />
+ <lcid name="ar-KW" id="0x3401" parent="0x0001" specific="0x3401" iso2="ar" iso3="ara" win="ARK" icu_name="Arabic (Kuwait)" />
+ <lcid name="fi" id="0x000B" parent="0x007F" specific="0x040B" iso2="fi" iso3="fin" win="FIN" icu_name="Finnish" />
+ <lcid name="fr" id="0x000C" parent="0x007F" specific="0x040C" iso2="fr" iso3="fra" win="FRA" icu_name="French" />
+ <lcid name="he" id="0x000D" parent="0x007F" specific="0x040D" iso2="he" iso3="heb" win="HEB" icu_name="Hebrew" />
+ <lcid name="hu" id="0x000E" parent="0x007F" specific="0x040E" iso2="hu" iso3="hun" win="HUN" icu_name="Hungarian" />
+ <lcid name="is" id="0x000F" parent="0x007F" specific="0x040F" iso2="is" iso3="isl" win="ISL" icu_name="Icelandic" />
+ <lcid name="it" id="0x0010" parent="0x007F" specific="0x0410" iso2="it" iso3="ita" win="ITA" icu_name="Italian" />
+ <lcid name="ja" id="0x0011" parent="0x007F" specific="0x0411" iso2="ja" iso3="jpn" win="JPN" icu_name="Japanese" />
+ <lcid name="en-PH" id="0x3409" parent="0x0009" specific="0x3409" iso2="en" iso3="eng" win="ENP" icu_name="English (Philippines)" />
+ <lcid name="nl" id="0x0013" parent="0x007F" specific="0x0413" iso2="nl" iso3="nld" win="NLD" icu_name="Dutch" />
+ <lcid name="ko" id="0x0012" parent="0x007F" specific="0x0412" iso2="ko" iso3="kor" win="KOR" icu_name="Korean" />
+ <lcid name="ar-SA" id="0x0401" parent="0x0001" specific="0x0401" iso2="ar" iso3="ara" win="ARA" icu_name="Arabic (Saudi Arabia)" />
+ <lcid name="bg-BG" id="0x0402" parent="0x0002" specific="0x0402" iso2="bg" iso3="bul" win="BGR" icu_name="Bulgarian (Bulgaria)" />
+ <lcid name="ca-ES" id="0x0403" parent="0x0003" specific="0x0403" iso2="ca" iso3="cat" win="CAT" icu_name="Catalan (Spain)" />
+ <lcid name="zh-TW" id="0x0404" parent="0x7C04" specific="0x0404" iso2="zh" iso3="zho" win="CHT" icu_name="Chinese (Taiwan)" />
+ <lcid name="cs-CZ" id="0x0405" parent="0x0005" specific="0x0405" iso2="cs" iso3="ces" win="CSY" icu_name="Czech (Czech Republic)" />
+ <lcid name="hr" id="0x001A" parent="0x007F" specific="0x041A" iso2="hr" iso3="hrv" win="HRV" icu_name="Croatian" />
+ <lcid name="de-DE" id="0x0407" parent="0x0007" specific="0x0407" iso2="de" iso3="deu" win="DEU" icu_name="German (Germany)" />
+ <lcid name="sq" id="0x001C" parent="0x007F" specific="0x041C" iso2="sq" iso3="sqi" win="SQI" icu_name="Albanian" />
+ <lcid name="en-US" id="0x0409" parent="0x0009" specific="0x0409" iso2="en" iso3="eng" win="ENU" icu_name="English (United States)" />
+ <lcid name="ar-AE" id="0x3801" parent="0x0001" specific="0x3801" iso2="ar" iso3="ara" win="ARU" icu_name="Arabic (United Arab Emirates)" />
+ <lcid name="fi-FI" id="0x040B" parent="0x000B" specific="0x040B" iso2="fi" iso3="fin" win="FIN" icu_name="Finnish (Finland)" />
+ <lcid name="fr-FR" id="0x040C" parent="0x000C" specific="0x040C" iso2="fr" iso3="fra" win="FRA" icu_name="French (France)" />
+ <lcid name="he-IL" id="0x040D" parent="0x000D" specific="0x040D" iso2="he" iso3="heb" win="HEB" icu_name="Hebrew (Israel)" />
+ <lcid name="hu-HU" id="0x040E" parent="0x000E" specific="0x040E" iso2="hu" iso3="hun" win="HUN" icu_name="Hungarian (Hungary)" />
+ <lcid name="be" id="0x0023" parent="0x007F" specific="0x0423" iso2="be" iso3="bel" win="BEL" icu_name="Belarusian" />
+ <lcid name="id" id="0x0021" parent="0x007F" specific="0x0421" iso2="id" iso3="ind" win="IND" icu_name="Indonesian" />
+ <lcid name="et" id="0x0025" parent="0x007F" specific="0x0425" iso2="et" iso3="est" win="ETI" icu_name="Estonian" />
+ <lcid name="ko-KR" id="0x0412" parent="0x0012" specific="0x0412" iso2="ko" iso3="kor" win="KOR" icu_name="Korean (South Korea)" />
+ <lcid name="nl-NL" id="0x0413" parent="0x0013" specific="0x0413" iso2="nl" iso3="nld" win="NLD" icu_name="Dutch (Netherlands)" />
+ <lcid name="no" id="0x0014" parent="0x007F" specific="0x0414" iso2="no" iso3="nor" win="NOR" icu_name="Norwegian" />
+ <lcid name="fa" id="0x0029" parent="0x007F" specific="0x0429" iso2="fa" iso3="fas" win="FAR" icu_name="Persian" />
+ <lcid name="lt" id="0x0027" parent="0x007F" specific="0x0427" iso2="lt" iso3="lit" win="LTH" icu_name="Lithuanian" />
+ <lcid name="hy" id="0x002B" parent="0x007F" specific="0x042B" iso2="hy" iso3="hye" win="HYE" icu_name="Armenian" />
+ <lcid name="zh-CN" id="0x0804" parent="0x0004" specific="0x0804" iso2="zh" iso3="zho" win="CHS" icu_name="Chinese (China)" />
+ <lcid name="eu" id="0x002D" parent="0x007F" specific="0x042D" iso2="eu" iso3="eus" win="EUQ" icu_name="Basque" />
+ <lcid name="hr-HR" id="0x041A" parent="0x001A" specific="0x041A" iso2="hr" iso3="hrv" win="HRV" icu_name="Croatian (Croatia)" />
+ <lcid name="de-CH" id="0x0807" parent="0x0007" specific="0x0807" iso2="de" iso3="deu" win="DES" icu_name="German (Switzerland)" />
+ <lcid name="sq-AL" id="0x041C" parent="0x001C" specific="0x041C" iso2="sq" iso3="sqi" win="SQI" icu_name="Albanian (Albania)" />
+ <lcid name="en-GB" id="0x0809" parent="0x0009" specific="0x0809" iso2="en" iso3="eng" win="ENG" icu_name="English (United Kingdom)" />
+ <lcid name="ar-BH" id="0x3C01" parent="0x0001" specific="0x3C01" iso2="ar" iso3="ara" win="ARH" icu_name="Arabic (Bahrain)" />
+ <lcid name="pl" id="0x0015" parent="0x007F" specific="0x0415" iso2="pl" iso3="pol" win="PLK" icu_name="Polish" />
+ <lcid name="fr-BE" id="0x080C" parent="0x000C" specific="0x080C" iso2="fr" iso3="fra" win="FRB" icu_name="French (Belgium)" />
+ <lcid name="id-ID" id="0x0421" parent="0x0021" specific="0x0421" iso2="id" iso3="ind" win="IND" icu_name="Indonesian (Indonesia)" />
+ <lcid name="af" id="0x0036" parent="0x007F" specific="0x0436" iso2="af" iso3="afr" win="AFK" icu_name="Afrikaans" />
+ <lcid name="be-BY" id="0x0423" parent="0x0023" specific="0x0423" iso2="be" iso3="bel" win="BEL" icu_name="Belarusian (Belarus)" />
+ <lcid name="fo" id="0x0038" parent="0x007F" specific="0x0438" iso2="fo" iso3="fao" win="FOS" icu_name="Faroese" />
+ <lcid name="et-EE" id="0x0425" parent="0x0025" specific="0x0425" iso2="et" iso3="est" win="ETI" icu_name="Estonian (Estonia)" />
+ <lcid name="lv-LV" id="0x0426" parent="0x0026" specific="0x0426" iso2="lv" iso3="lav" win="LVI" icu_name="Latvian (Latvia)" />
+ <lcid name="nl-BE" id="0x0813" parent="0x0013" specific="0x0813" iso2="nl" iso3="nld" win="NLB" icu_name="Dutch (Belgium)" />
+ <lcid name="da-DK" id="0x0406" parent="0x0006" specific="0x0406" iso2="da" iso3="dan" win="DAN" icu_name="Danish (Denmark)" />
+ <lcid name="fa-IR" id="0x0429" parent="0x0029" specific="0x0429" iso2="fa" iso3="fas" win="FAR" icu_name="Persian (Iran)" />
+ <lcid name="el-GR" id="0x0408" parent="0x0008" specific="0x0408" iso2="el" iso3="ell" win="ELL" icu_name="Greek (Greece)" />
+ <lcid name="hy-AM" id="0x042B" parent="0x002B" specific="0x042B" iso2="hy" iso3="hye" win="HYE" icu_name="Armenian (Armenia)" />
+ <lcid name="zh-HK" id="0x0C04" parent="0x7C04" specific="0x0C04" iso2="zh" iso3="zho" win="ZHH" icu_name="Chinese (Hong Kong S.A.R., China)" />
+ <lcid name="eu-ES" id="0x042D" parent="0x002D" specific="0x042D" iso2="eu" iso3="eus" win="EUQ" icu_name="Basque (Spain)" />
+ <lcid name="hi" id="0x0039" parent="0x007F" specific="0x0439" iso2="hi" iso3="hin" win="HIN" icu_name="Hindi" />
+ <lcid name="de-AT" id="0x0C07" parent="0x0007" specific="0x0C07" iso2="de" iso3="deu" win="DEA" icu_name="German (Austria)" />
+ <lcid name="lv" id="0x0026" parent="0x007F" specific="0x0426" iso2="lv" iso3="lav" win="LVI" icu_name="Latvian" />
+ <lcid name="en-AU" id="0x0C09" parent="0x0009" specific="0x0C09" iso2="en" iso3="eng" win="ENA" icu_name="English (Australia)" />
+ <lcid name="ar-QA" id="0x4001" parent="0x0001" specific="0x4001" iso2="ar" iso3="ara" win="ARQ" icu_name="Arabic (Qatar)" />
+ <lcid name="gu" id="0x0047" parent="0x007F" specific="0x0447" iso2="gu" iso3="guj" win="GUJ" icu_name="Gujarati" />
+ <lcid name="fr-CA" id="0x0C0C" parent="0x000C" specific="0x0C0C" iso2="fr" iso3="fra" win="FRC" icu_name="French (Canada)" />
+ <lcid name="ru" id="0x0019" parent="0x007F" specific="0x0419" iso2="ru" iso3="rus" win="RUS" icu_name="Russian" />
+ <lcid name="af-ZA" id="0x0436" parent="0x0036" specific="0x0436" iso2="af" iso3="afr" win="AFK" icu_name="Afrikaans (South Africa)" />
+ <lcid name="kn" id="0x004B" parent="0x007F" specific="0x044B" iso2="kn" iso3="kan" win="KAN" icu_name="Kannada" />
+ <lcid name="fo-FO" id="0x0438" parent="0x0038" specific="0x0438" iso2="fo" iso3="fao" win="FOS" icu_name="Faroese (Faroe Islands)" />
+ <lcid name="hi-IN" id="0x0439" parent="0x0039" specific="0x0439" iso2="hi" iso3="hin" win="HIN" icu_name="Hindi (India)" />
+ <lcid name="mr" id="0x004E" parent="0x007F" specific="0x044E" iso2="mr" iso3="mar" win="MAR" icu_name="Marathi" />
+ <lcid name="ru-RU" id="0x0419" parent="0x0019" specific="0x0419" iso2="ru" iso3="rus" win="RUS" icu_name="Russian (Russia)" />
+ <lcid name="mk" id="0x002F" parent="0x007F" specific="0x042F" iso2="mk" iso3="mkd" win="MKI" icu_name="Macedonian" />
+ <lcid name="ar-LY" id="0x1001" parent="0x0001" specific="0x1001" iso2="ar" iso3="ara" win="ARL" icu_name="Arabic (Libya)" />
+ <lcid name="pt" id="0x0016" parent="0x007F" specific="0x0416" iso2="pt" iso3="por" win="PTB" icu_name="Portuguese" />
+ <lcid name="sk" id="0x001B" parent="0x007F" specific="0x041B" iso2="sk" iso3="slk" win="SKY" icu_name="Slovak" />
+ <lcid name="zh-SG" id="0x1004" parent="0x0004" specific="0x1004" iso2="zh" iso3="zho" win="ZHI" icu_name="Chinese (Singapore)" />
+ <lcid name="sw" id="0x0041" parent="0x007F" specific="0x0441" iso2="sw" iso3="swa" win="SWK" icu_name="Swahili" />
+ <lcid name="gl" id="0x0056" parent="0x007F" specific="0x0456" iso2="gl" iso3="glg" win="GLC" icu_name="Gallegan" />
+ <lcid name="de-LU" id="0x1007" parent="0x0007" specific="0x1007" iso2="de" iso3="deu" win="DEL" icu_name="German (Luxembourg)" />
+ <lcid name="ro" id="0x0018" parent="0x007F" specific="0x0418" iso2="ro" iso3="ron" win="ROM" icu_name="Romanian" />
+ <lcid name="en-CA" id="0x1009" parent="0x0009" specific="0x1009" iso2="en" iso3="eng" win="ENC" icu_name="English (Canada)" />
+ <lcid name="sl" id="0x0024" parent="0x007F" specific="0x0424" iso2="sl" iso3="slv" win="SLV" icu_name="Slovenian" />
+ <lcid name="gu-IN" id="0x0447" parent="0x0047" specific="0x0447" iso2="gu" iso3="guj" win="GUJ" icu_name="Gujarati (India)" />
+ <lcid name="fr-CH" id="0x100C" parent="0x000C" specific="0x100C" iso2="fr" iso3="fra" win="FRS" icu_name="French (Switzerland)" />
+ <lcid name="es-BO" id="0x400A" parent="0x000A" specific="0x400A" iso2="es" iso3="spa" win="ESB" icu_name="Spanish (Bolivia)" />
+ <lcid name="lt-LT" id="0x0427" parent="0x0027" specific="0x0427" iso2="lt" iso3="lit" win="LTH" icu_name="Lithuanian (Lithuania)" />
+ <lcid name="kn-IN" id="0x044B" parent="0x004B" specific="0x044B" iso2="kn" iso3="kan" win="KAN" icu_name="Kannada (India)" />
+ <lcid name="es" id="0x000A" parent="0x007F" specific="0x0C0A" iso2="es" iso3="spa" win="ESP" icu_name="Spanish" />
+ <lcid name="sv" id="0x001D" parent="0x007F" specific="0x041D" iso2="sv" iso3="swe" win="SVE" icu_name="Swedish" />
+ <lcid name="mr-IN" id="0x044E" parent="0x004E" specific="0x044E" iso2="mr" iso3="mar" win="MAR" icu_name="Marathi (India)" />
+ <lcid name="kok" id="0x0057" parent="0x007F" specific="0x0457" iso2="hi" iso3="kok" win="KNK" icu_name="Konkani" />
+ <lcid name="th" id="0x001E" parent="0x007F" specific="0x041E" iso2="th" iso3="tha" win="THA" icu_name="Thai" />
+ <lcid name="ar-DZ" id="0x1401" parent="0x0001" specific="0x1401" iso2="ar" iso3="ara" win="ARG" icu_name="Arabic (Algeria)" />
+ <lcid name="mk-MK" id="0x042F" parent="0x002F" specific="0x042F" iso2="mk" iso3="mkd" win="MKI" icu_name="Macedonian (Macedonia)" />
+ <lcid name="is-IS" id="0x040F" parent="0x000F" specific="0x040F" iso2="is" iso3="isl" win="ISL" icu_name="Icelandic (Iceland)" />
+ <lcid name="zh-MO" id="0x1404" parent="0x0004" specific="0x1404" iso2="zh" iso3="zho" win="ZHM" icu_name="Chinese (Macao S.A.R. China)" />
+ <lcid name="ja-JP" id="0x0411" parent="0x0011" specific="0x0411" iso2="ja" iso3="jpn" win="JPN" icu_name="Japanese (Japan)" />
+ <lcid name="gl-ES" id="0x0456" parent="0x0056" specific="0x0456" iso2="gl" iso3="glg" win="GLC" icu_name="Gallegan (Spain)" />
+ <lcid name="ar-IQ" id="0x0801" parent="0x0001" specific="0x0801" iso2="ar" iso3="ara" win="ARI" icu_name="Arabic (Iraq)" />
+ <lcid name="nb-NO" id="0x0414" parent="0x0014" specific="0x0414" iso2="nb" iso3="nob" win="NOR" icu_name="Norwegian Bokm?l (Norway)" />
+ <lcid name="en-NZ" id="0x1409" parent="0x0009" specific="0x1409" iso2="en" iso3="eng" win="ENZ" icu_name="English (New Zealand)" />
+ <lcid name="pt-BR" id="0x0416" parent="0x0016" specific="0x0416" iso2="pt" iso3="por" win="PTB" icu_name="Portuguese (Brazil)" />
+ <lcid name="tr" id="0x001F" parent="0x007F" specific="0x041F" iso2="tr" iso3="tur" win="TRK" icu_name="Turkish" />
+ <lcid name="fr-LU" id="0x140C" parent="0x000C" specific="0x140C" iso2="fr" iso3="fra" win="FRL" icu_name="French (Luxembourg)" />
+ <lcid name="ta" id="0x0049" parent="0x007F" specific="0x0449" iso2="ta" iso3="tam" win="TAM" icu_name="Tamil" />
+ <lcid name="te" id="0x004A" parent="0x007F" specific="0x044A" iso2="te" iso3="tel" win="TEL" icu_name="Telugu" />
+ <lcid name="sk-SK" id="0x041B" parent="0x001B" specific="0x041B" iso2="sk" iso3="slk" win="SKY" icu_name="Slovak (Slovakia)" />
+ <lcid name="es-MX" id="0x080A" parent="0x000A" specific="0x080A" iso2="es" iso3="spa" win="ESM" icu_name="Spanish (Mexico)" />
+ <lcid name="sv-SE" id="0x041D" parent="0x001D" specific="0x041D" iso2="sv" iso3="swe" win="SVE" icu_name="Swedish (Sweden)" />
+ <lcid name="th-TH" id="0x041E" parent="0x001E" specific="0x041E" iso2="th" iso3="tha" win="THA" icu_name="Thai (Thailand)" />
+ <lcid name="es-HN" id="0x480A" parent="0x000A" specific="0x480A" iso2="es" iso3="spa" win="ESH" icu_name="Spanish (Honduras)" />
+ <lcid name="vi" id="0x002A" parent="0x007F" specific="0x042A" iso2="vi" iso3="vie" win="VIT" icu_name="Vietnamese" />
+ <lcid name="ar-MA" id="0x1801" parent="0x0001" specific="0x1801" iso2="ar" iso3="ara" win="ARM" icu_name="Arabic (Morocco)" />
+ <lcid name="zh-CHT" id="0x7C04" parent="0x007F" specific="0x0000" iso2="zh" iso3="zho" win="CHT" icu_name="Chinese (Taiwan)" />
+ <lcid name="uk" id="0x0022" parent="0x007F" specific="0x0422" iso2="uk" iso3="ukr" win="UKR" icu_name="Ukrainian" />
+ <lcid name="nn-NO" id="0x0814" parent="0x0014" specific="0x0814" iso2="nn" iso3="nno" win="NON" icu_name="Norwegian Nynorsk (Norway)" />
+ <lcid name="pt-PT" id="0x0816" parent="0x0016" specific="0x0816" iso2="pt" iso3="por" win="PTG" icu_name="Portuguese (Portugal)" />
+ <lcid name="en-IE" id="0x1809" parent="0x0009" specific="0x1809" iso2="en" iso3="eng" win="ENI" icu_name="English (Ireland)" />
+ <lcid name="es-PA" id="0x180A" parent="0x000A" specific="0x180A" iso2="es" iso3="spa" win="ESA" icu_name="Spanish (Panama)" />
+ <lcid name="fr-MC" id="0x180C" parent="0x000C" specific="0x180C" iso2="fr" iso3="fra" win="FRM" icu_name="French (Monaco)" />
+ <lcid name="sv-FI" id="0x081D" parent="0x001D" specific="0x081D" iso2="sv" iso3="swe" win="SVF" icu_name="Swedish (Finland)" />
+ <lcid name="it-IT" id="0x0410" parent="0x0010" specific="0x0410" iso2="it" iso3="ita" win="ITA" icu_name="Italian (Italy)" />
+ <lcid name="es-NI" id="0x4C0A" parent="0x000A" specific="0x4C0A" iso2="es" iso3="spa" win="ESI" icu_name="Spanish (Nicaragua)" />
+ <lcid name="ar-TN" id="0x1C01" parent="0x0001" specific="0x1C01" iso2="ar" iso3="ara" win="ART" icu_name="Arabic (Tunisia)" />
+ <lcid name="kok-IN" id="0x0457" parent="0x0057" specific="0x0457" iso2="kok" iso3="kok" win="KNK" icu_name="Konkani (India)" />
+ <lcid name="es-SV" id="0x440A" parent="0x000A" specific="0x440A" iso2="es" iso3="spa" win="ESE" icu_name="Spanish (El Salvador)" />
+ <lcid name="ro-RO" id="0x0418" parent="0x0018" specific="0x0418" iso2="ro" iso3="ron" win="ROM" icu_name="Romanian (Romania)" />
+ <lcid name="en-ZA" id="0x1C09" parent="0x0009" specific="0x1C09" iso2="en" iso3="eng" win="ENS" icu_name="English (South Africa)" />
+ <lcid name="es-DO" id="0x1C0A" parent="0x000A" specific="0x1C0A" iso2="es" iso3="spa" win="ESD" icu_name="Spanish (Dominican Republic)" />
+ <lcid name="tr-TR" id="0x041F" parent="0x001F" specific="0x041F" iso2="tr" iso3="tur" win="TRK" icu_name="Turkish (Turkey)" />
+ <lcid name="sw-KE" id="0x0441" parent="0x0041" specific="0x0441" iso2="sw" iso3="swa" win="SWK" icu_name="Swahili (Kenya)" />
+ <lcid name="ar-EG" id="0x0C01" parent="0x0001" specific="0x0C01" iso2="ar" iso3="ara" win="ARE" icu_name="Arabic (Egypt)" />
+ <lcid name="ar-OM" id="0x2001" parent="0x0001" specific="0x2001" iso2="ar" iso3="ara" win="ARO" icu_name="Arabic (Oman)" />
+ <lcid name="ta-IN" id="0x0449" parent="0x0049" specific="0x0449" iso2="ta" iso3="tam" win="TAM" icu_name="Tamil (India)" />
+ <lcid name="te-IN" id="0x044A" parent="0x004A" specific="0x044A" iso2="te" iso3="tel" win="TEL" icu_name="Telugu (India)" />
+ <lcid name="vi-VN" id="0x042A" parent="0x002A" specific="0x042A" iso2="vi" iso3="vie" win="VIT" icu_name="Vietnamese (Vietnam)" />
+ <lcid name="es-ES" id="0x0C0A" parent="0x000A" specific="0x0C0A" iso2="es" iso3="spa" win="ESN" icu_name="Spanish (Spain)" />
+ <lcid name="en-JM" id="0x2009" parent="0x0009" specific="0x2009" iso2="en" iso3="eng" win="ENJ" icu_name="English (Jamaica)" />
+ <lcid name="es-VE" id="0x200A" parent="0x000A" specific="0x200A" iso2="es" iso3="spa" win="ESV" icu_name="Spanish (Venezuela)" />
+ <lcid name="pl-PL" id="0x0415" parent="0x0015" specific="0x0415" iso2="pl" iso3="pol" win="PLK" icu_name="Polish (Poland)" />
+ <lcid name="de-LI" id="0x1407" parent="0x0007" specific="0x1407" iso2="de" iso3="deu" win="DEC" icu_name="German (Liechtenstein)" />
+ <lcid name="ar-YE" id="0x2401" parent="0x0001" specific="0x2401" iso2="ar" iso3="ara" win="ARY" icu_name="Arabic (Yemen)" />
+ <lcid name="es-CR" id="0x140A" parent="0x000A" specific="0x140A" iso2="es" iso3="spa" win="ESC" icu_name="Spanish (Costa Rica)" />
+ <lcid name="Cy-sr-SP" id="0x0C1A" parent="0x001A" specific="0x0C1A" iso2="sr" iso3="srp" win="SRB" icu_name="Serbian" />
+ <lcid name="es-CL" id="0x340A" parent="0x000A" specific="0x340A" iso2="es" iso3="spa" win="ESL" icu_name="Spanish (Chile)" />
+ <lcid name="it-CH" id="0x0810" parent="0x0010" specific="0x0810" iso2="it" iso3="ita" win="ITS" icu_name="Italian (Switzerland)" />
+ <lcid name="en-CB" id="0x2409" parent="0x0009" specific="0x2409" iso2="en" iso3="eng" win="ENB" icu_name="English (U.S. Virgin Islands)" />
+ <lcid name="es-CO" id="0x240A" parent="0x000A" specific="0x240A" iso2="es" iso3="spa" win="ESO" icu_name="Spanish (Colombia)" />
+ <lcid name="es-PR" id="0x500A" parent="0x000A" specific="0x500A" iso2="es" iso3="spa" win="ESU" icu_name="Spanish (Puerto Rico)" />
+ <lcid name="uk-UA" id="0x0422" parent="0x0022" specific="0x0422" iso2="uk" iso3="ukr" win="UKR" icu_name="Ukrainian (Ukraine)" />
+ <lcid name="sl-SI" id="0x0424" parent="0x0024" specific="0x0424" iso2="sl" iso3="slv" win="SLV" icu_name="Slovenian (Slovenia)" />
+ <lcid name="Lt-sr-SP" id="0x081A" parent="0x001A" specific="0x081A" iso2="sr" iso3="srp" win="SRL" icu_name="Serbo-Croatian" />
+ <lcid name="ar-SY" id="0x2801" parent="0x0001" specific="0x2801" iso2="ar" iso3="ara" win="ARS" icu_name="Arabic (Syria)" />
+ <lcid name="en-BZ" id="0x2809" parent="0x0009" specific="0x2809" iso2="en" iso3="eng" win="ENL" icu_name="English (Belize)" />
+ <lcid name="es-PE" id="0x280A" parent="0x000A" specific="0x280A" iso2="es" iso3="spa" win="ESR" icu_name="Spanish (Peru)" />
+ <lcid name="es-GT" id="0x100A" parent="0x000A" specific="0x100A" iso2="es" iso3="spa" win="ESG" icu_name="Spanish (Guatemala)" />
+ <lcid name="ar-JO" id="0x2C01" parent="0x0001" specific="0x2C01" iso2="ar" iso3="ara" win="ARJ" icu_name="Arabic (Jordan)" />
+ <lcid name="en-TT" id="0x2C09" parent="0x0009" specific="0x2C09" iso2="en" iso3="eng" win="ENT" icu_name="English (Trinidad and Tobago)" />
+ <lcid name="es-AR" id="0x2C0A" parent="0x000A" specific="0x2C0A" iso2="es" iso3="spa" win="ESS" icu_name="Spanish (Argentina)" />
+ <lcid name="es-PY" id="0x3C0A" parent="0x000A" specific="0x3C0A" iso2="es" iso3="spa" win="ESZ" icu_name="Spanish (Paraguay)" />
+ <lcid name="es-UY" id="0x380A" parent="0x000A" specific="0x380A" iso2="es" iso3="spa" win="ESY" icu_name="Spanish (Uruguay)" />
+ <lcid name="ar-LB" id="0x3001" parent="0x0001" specific="0x3001" iso2="ar" iso3="ara" win="ARB" icu_name="Arabic (Lebanon)" />
+ <lcid name="en-ZW" id="0x3009" parent="0x0009" specific="0x3009" iso2="en" iso3="eng" win="ENW" icu_name="English (Zimbabwe)" />
+ <lcid name="es-EC" id="0x300A" parent="0x000A" specific="0x300A" iso2="es" iso3="spa" win="ESF" icu_name="Spanish (Ecuador)" />
+</lcids> \ No newline at end of file
diff --git a/tools/locale-builder/supplementalData.xml b/tools/locale-builder/supplementalData.xml
new file mode 100644
index 00000000000..ca4620776b8
--- /dev/null
+++ b/tools/locale-builder/supplementalData.xml
@@ -0,0 +1,968 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE supplementalData SYSTEM "http://www.openi18n.org/spec/ldml/1.0/ldmlSupplemental.dtd" >
+<supplementalData>
+ <currencyData>
+ <fractions>
+ <info iso4217="ADP" digits="0" />
+ <info iso4217="BHD" digits="3" />
+ <info iso4217="BIF" digits="0" />
+ <info iso4217="BYR" digits="0" />
+ <info iso4217="CHF" digits="2" rounding="5" />
+ <info iso4217="CLF" digits="0" />
+ <info iso4217="CLP" digits="0" />
+ <info iso4217="DEFAULT" digits="2" />
+ <info iso4217="DJF" digits="0" />
+ <info iso4217="GNF" digits="0" />
+ <info iso4217="IQD" digits="3" />
+ <info iso4217="JOD" digits="3" />
+ <info iso4217="JPY" digits="0" />
+ <info iso4217="KMF" digits="0" />
+ <info iso4217="KRW" digits="0" />
+ <info iso4217="KWD" digits="3" />
+ <info iso4217="LYD" digits="3" />
+ <info iso4217="MGF" digits="0" />
+ <info iso4217="OMR" digits="3" />
+ <info iso4217="PYG" digits="0" />
+ <info iso4217="RWF" digits="0" />
+ <info iso4217="TND" digits="3" />
+ <info iso4217="TRL" digits="0" />
+ <info iso4217="TTD" digits="0" />
+ <info iso4217="VUV" digits="0" />
+ <info iso4217="XAF" digits="0" />
+ <info iso4217="XOF" digits="0" />
+ <info iso4217="XPF" digits="0" />
+ </fractions>
+ <region iso3166="AE">
+ <currency iso4217="AED" >
+ </currency>
+ </region>
+ <region iso3166="AF">
+ <currency iso4217="AFN" >
+ </currency>
+ </region>
+ <region iso3166="AG">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="AI">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="AL">
+ <currency iso4217="ALL" >
+ </currency>
+ </region>
+ <region iso3166="AM">
+ <currency iso4217="AMD" >
+ </currency>
+ </region>
+ <region iso3166="AN">
+ <currency iso4217="ANG" >
+ </currency>
+ </region>
+ <region iso3166="AO">
+ <currency iso4217="AOA" >
+ </currency>
+ </region>
+ <region iso3166="AR">
+ <currency iso4217="ARS" >
+ </currency>
+ </region>
+ <region iso3166="AS">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="AT">
+ <currency iso4217="EUR" >
+ <alternate iso4217="ATS"/>
+ </currency>
+ </region>
+ <region iso3166="AU">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="AW">
+ <currency iso4217="AWG" >
+ </currency>
+ </region>
+ <region iso3166="AZ">
+ <currency iso4217="AZM" >
+ </currency>
+ </region>
+ <region iso3166="BA">
+ <currency iso4217="BAM" >
+ </currency>
+ </region>
+ <region iso3166="BB">
+ <currency iso4217="BBD" >
+ </currency>
+ </region>
+ <region iso3166="BD">
+ <currency iso4217="BDT" >
+ </currency>
+ </region>
+ <region iso3166="BE">
+ <currency iso4217="EUR" >
+ <alternate iso4217="BEF"/>
+ </currency>
+ </region>
+ <region iso3166="BF">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="BG">
+ <currency iso4217="BGN" >
+ </currency>
+ </region>
+ <region iso3166="BH">
+ <currency iso4217="BHD" >
+ </currency>
+ </region>
+ <region iso3166="BI">
+ <currency iso4217="BIF" >
+ </currency>
+ </region>
+ <region iso3166="BJ">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="BM">
+ <currency iso4217="BMD" >
+ </currency>
+ </region>
+ <region iso3166="BN">
+ <currency iso4217="BND" >
+ </currency>
+ </region>
+ <region iso3166="BO">
+ <currency iso4217="BOB" >
+ </currency>
+ </region>
+ <region iso3166="BR">
+ <currency iso4217="BRL" >
+ </currency>
+ </region>
+ <region iso3166="BS">
+ <currency iso4217="BSD" >
+ </currency>
+ </region>
+ <region iso3166="BV">
+ <currency iso4217="NOK" >
+ </currency>
+ </region>
+ <region iso3166="BW">
+ <currency iso4217="BWP" >
+ </currency>
+ </region>
+ <region iso3166="BY">
+ <currency iso4217="BYR" >
+ </currency>
+ </region>
+ <region iso3166="BZ">
+ <currency iso4217="BZD" >
+ </currency>
+ </region>
+ <region iso3166="CA">
+ <currency iso4217="CAD" >
+ </currency>
+ </region>
+ <region iso3166="CC">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="CD">
+ <currency iso4217="CDF" >
+ </currency>
+ </region>
+ <region iso3166="CF">
+ <currency iso4217="XAF" >
+ </currency>
+ </region>
+ <region iso3166="CG">
+ <currency iso4217="XAF" >
+ </currency>
+ </region>
+ <region iso3166="CH">
+ <currency iso4217="CHF" >
+ </currency>
+ </region>
+ <region iso3166="CI">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="CK">
+ <currency iso4217="NZD" >
+ </currency>
+ </region>
+ <region iso3166="CL">
+ <currency iso4217="CLP" >
+ </currency>
+ </region>
+ <region iso3166="CM">
+ <currency iso4217="XAF" >
+ </currency>
+ </region>
+ <region iso3166="CN">
+ <currency iso4217="CNY" >
+ </currency>
+ </region>
+ <region iso3166="CO">
+ <currency iso4217="COP" >
+ </currency>
+ </region>
+ <region iso3166="CR">
+ <currency iso4217="CRC" >
+ </currency>
+ </region>
+ <region iso3166="CU">
+ <currency iso4217="CUP" >
+ </currency>
+ </region>
+ <region iso3166="CV">
+ <currency iso4217="CVE" >
+ </currency>
+ </region>
+ <region iso3166="CX">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="CY">
+ <currency iso4217="CYP" >
+ </currency>
+ </region>
+ <region iso3166="CZ">
+ <currency iso4217="CZK" >
+ </currency>
+ </region>
+ <region iso3166="DE">
+ <currency iso4217="EUR" >
+ <alternate iso4217="DEM"/>
+ </currency>
+ </region>
+ <region iso3166="DJ">
+ <currency iso4217="DJF" >
+ </currency>
+ </region>
+ <region iso3166="DK">
+ <currency iso4217="DKK" >
+ </currency>
+ </region>
+ <region iso3166="DM">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="DO">
+ <currency iso4217="DOP" >
+ </currency>
+ </region>
+ <region iso3166="DZ">
+ <currency iso4217="DZD" >
+ </currency>
+ </region>
+ <region iso3166="EC">
+ <currency iso4217="ECS" >
+ </currency>
+ </region>
+ <region iso3166="EE">
+ <currency iso4217="EEK" >
+ </currency>
+ </region>
+ <region iso3166="EG">
+ <currency iso4217="EGP" >
+ </currency>
+ </region>
+ <region iso3166="EH">
+ <currency iso4217="MAD" >
+ </currency>
+ </region>
+ <region iso3166="ER">
+ <currency iso4217="ERN" >
+ </currency>
+ </region>
+ <region iso3166="ES">
+ <currency iso4217="EUR" >
+ <alternate iso4217="ESP"/>
+ </currency>
+ </region>
+ <region iso3166="ET">
+ <currency iso4217="ETB" >
+ </currency>
+ </region>
+ <region iso3166="FI">
+ <currency iso4217="EUR" >
+ <alternate iso4217="FIM"/>
+ </currency>
+ </region>
+ <region iso3166="FJ">
+ <currency iso4217="FJD" >
+ </currency>
+ </region>
+ <region iso3166="FK">
+ <currency iso4217="FKP" >
+ </currency>
+ </region>
+ <region iso3166="FM">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="FO">
+ <currency iso4217="DKK" >
+ </currency>
+ </region>
+ <region iso3166="FR">
+ <currency iso4217="EUR" >
+ <alternate iso4217="FRF"/>
+ </currency>
+ </region>
+ <region iso3166="GA">
+ <currency iso4217="XAF" >
+ </currency>
+ </region>
+ <region iso3166="GB">
+ <currency iso4217="GBP" >
+ </currency>
+ </region>
+ <region iso3166="GD">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="GE">
+ <currency iso4217="GEL" >
+ </currency>
+ </region>
+ <region iso3166="GF">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="GH">
+ <currency iso4217="GHC" >
+ </currency>
+ </region>
+ <region iso3166="GI">
+ <currency iso4217="GIP" >
+ </currency>
+ </region>
+ <region iso3166="GL">
+ <currency iso4217="DKK" >
+ </currency>
+ </region>
+ <region iso3166="GM">
+ <currency iso4217="GMD" >
+ </currency>
+ </region>
+ <region iso3166="GN">
+ <currency iso4217="GNF" >
+ </currency>
+ </region>
+ <region iso3166="GP">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="GQ">
+ <currency iso4217="XAF" >
+ </currency>
+ </region>
+ <region iso3166="GR">
+ <currency iso4217="EUR" >
+ <alternate iso4217="GRD"/>
+ </currency>
+ </region>
+ <region iso3166="GT">
+ <currency iso4217="GTQ" >
+ </currency>
+ </region>
+ <region iso3166="GU">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="GY">
+ <currency iso4217="GYD" >
+ </currency>
+ </region>
+ <region iso3166="HK">
+ <currency iso4217="HKD" >
+ </currency>
+ </region>
+ <region iso3166="HM">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="HN">
+ <currency iso4217="HNL" >
+ </currency>
+ </region>
+ <region iso3166="HR">
+ <currency iso4217="HRK" >
+ </currency>
+ </region>
+ <region iso3166="HU">
+ <currency iso4217="HUF" >
+ </currency>
+ </region>
+ <region iso3166="ID">
+ <currency iso4217="IDR" >
+ </currency>
+ </region>
+ <region iso3166="IE">
+ <currency iso4217="EUR" >
+ <alternate iso4217="IEP"/>
+ </currency>
+ </region>
+ <region iso3166="IL">
+ <currency iso4217="ILS" >
+ </currency>
+ </region>
+ <region iso3166="IN">
+ <currency iso4217="INR" >
+ </currency>
+ </region>
+ <region iso3166="IO">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="IQ">
+ <currency iso4217="IQD" >
+ </currency>
+ </region>
+ <region iso3166="IR">
+ <currency iso4217="IRR" >
+ </currency>
+ </region>
+ <region iso3166="IS">
+ <currency iso4217="ISK" >
+ </currency>
+ </region>
+ <region iso3166="IT">
+ <currency iso4217="EUR" >
+ <alternate iso4217="ITL"/>
+ </currency>
+ </region>
+ <region iso3166="JM">
+ <currency iso4217="JMD" >
+ </currency>
+ </region>
+ <region iso3166="JO">
+ <currency iso4217="JOD" >
+ </currency>
+ </region>
+ <region iso3166="JP">
+ <currency iso4217="JPY" >
+ </currency>
+ </region>
+ <region iso3166="KE">
+ <currency iso4217="KES" >
+ </currency>
+ </region>
+ <region iso3166="KG">
+ <currency iso4217="KGS" >
+ </currency>
+ </region>
+ <region iso3166="KH">
+ <currency iso4217="KHR" >
+ </currency>
+ </region>
+ <region iso3166="KI">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="KM">
+ <currency iso4217="KMF" >
+ </currency>
+ </region>
+ <region iso3166="KN">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="KP">
+ <currency iso4217="KPW" >
+ </currency>
+ </region>
+ <region iso3166="KR">
+ <currency iso4217="KRW" >
+ </currency>
+ </region>
+ <region iso3166="KW">
+ <currency iso4217="KWD" >
+ </currency>
+ </region>
+ <region iso3166="KY">
+ <currency iso4217="KYD" >
+ </currency>
+ </region>
+ <region iso3166="KZ">
+ <currency iso4217="KZT" >
+ </currency>
+ </region>
+ <region iso3166="LA">
+ <currency iso4217="LAK" >
+ </currency>
+ </region>
+ <region iso3166="LB">
+ <currency iso4217="LBP" >
+ </currency>
+ </region>
+ <region iso3166="LC">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="LI">
+ <currency iso4217="CHF" >
+ </currency>
+ </region>
+ <region iso3166="LK">
+ <currency iso4217="LKR" >
+ </currency>
+ </region>
+ <region iso3166="LR">
+ <currency iso4217="LRD" >
+ </currency>
+ </region>
+ <region iso3166="LT">
+ <currency iso4217="LTL" >
+ </currency>
+ </region>
+ <region iso3166="LU">
+ <currency iso4217="EUR" >
+ <alternate iso4217="LUF"/>
+ </currency>
+ </region>
+ <region iso3166="LV">
+ <currency iso4217="LVL" >
+ </currency>
+ </region>
+ <region iso3166="LY">
+ <currency iso4217="LYD" >
+ </currency>
+ </region>
+ <region iso3166="MA">
+ <currency iso4217="MAD" >
+ </currency>
+ </region>
+ <region iso3166="MC">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="MD">
+ <currency iso4217="MDL" >
+ </currency>
+ </region>
+ <region iso3166="MG">
+ <currency iso4217="MGF" >
+ </currency>
+ </region>
+ <region iso3166="MH">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="MK">
+ <currency iso4217="MKD" >
+ </currency>
+ </region>
+ <region iso3166="ML">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="MM">
+ <currency iso4217="MMK" >
+ </currency>
+ </region>
+ <region iso3166="MN">
+ <currency iso4217="MNT" >
+ </currency>
+ </region>
+ <region iso3166="MO">
+ <currency iso4217="MOP" >
+ </currency>
+ </region>
+ <region iso3166="MP">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="MQ">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="MR">
+ <currency iso4217="MRO" >
+ </currency>
+ </region>
+ <region iso3166="MS">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="MT">
+ <currency iso4217="MTL" >
+ </currency>
+ </region>
+ <region iso3166="MU">
+ <currency iso4217="MUR" >
+ </currency>
+ </region>
+ <region iso3166="MV">
+ <currency iso4217="MVR" >
+ </currency>
+ </region>
+ <region iso3166="MW">
+ <currency iso4217="MWK" >
+ </currency>
+ </region>
+ <region iso3166="MX">
+ <currency iso4217="MXN" >
+ </currency>
+ </region>
+ <region iso3166="MY">
+ <currency iso4217="MYR" >
+ </currency>
+ </region>
+ <region iso3166="MZ">
+ <currency iso4217="MZM" >
+ </currency>
+ </region>
+ <region iso3166="NC">
+ <currency iso4217="XPF" >
+ </currency>
+ </region>
+ <region iso3166="NE">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="NF">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="NG">
+ <currency iso4217="NGN" >
+ </currency>
+ </region>
+ <region iso3166="NI">
+ <currency iso4217="NIO" >
+ </currency>
+ </region>
+ <region iso3166="NL">
+ <currency iso4217="EUR" >
+ <alternate iso4217="NLG"/>
+ </currency>
+ </region>
+ <region iso3166="NO">
+ <currency iso4217="NOK" >
+ </currency>
+ </region>
+ <region iso3166="NP">
+ <currency iso4217="NPR" >
+ </currency>
+ </region>
+ <region iso3166="NR">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="NU">
+ <currency iso4217="NZD" >
+ </currency>
+ </region>
+ <region iso3166="NZ">
+ <currency iso4217="NZD" >
+ </currency>
+ </region>
+ <region iso3166="OM">
+ <currency iso4217="OMR" >
+ </currency>
+ </region>
+ <region iso3166="PA">
+ <currency iso4217="PAB" >
+ </currency>
+ </region>
+ <region iso3166="PE">
+ <currency iso4217="PEN" >
+ </currency>
+ </region>
+ <region iso3166="PF">
+ <currency iso4217="XPF" >
+ </currency>
+ </region>
+ <region iso3166="PG">
+ <currency iso4217="PGK" >
+ </currency>
+ </region>
+ <region iso3166="PH">
+ <currency iso4217="PHP" >
+ </currency>
+ </region>
+ <region iso3166="PK">
+ <currency iso4217="PKR" >
+ </currency>
+ </region>
+ <region iso3166="PL">
+ <currency iso4217="PLN" >
+ </currency>
+ </region>
+ <region iso3166="PM">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="PN">
+ <currency iso4217="NZD" >
+ </currency>
+ </region>
+ <region iso3166="PR">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="PT">
+ <currency iso4217="EUR" >
+ <alternate iso4217="PTE"/>
+ </currency>
+ </region>
+ <region iso3166="PW">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="PY">
+ <currency iso4217="PYG" >
+ </currency>
+ </region>
+ <region iso3166="QA">
+ <currency iso4217="QAR" >
+ </currency>
+ </region>
+ <region iso3166="RE">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="RO">
+ <currency iso4217="ROL" >
+ </currency>
+ </region>
+ <region iso3166="RU">
+ <currency iso4217="RUR" >
+ </currency>
+ </region>
+ <region iso3166="RW">
+ <currency iso4217="RWF" >
+ </currency>
+ </region>
+ <region iso3166="SA">
+ <currency iso4217="SAR" >
+ </currency>
+ </region>
+ <region iso3166="SB">
+ <currency iso4217="SBD" >
+ </currency>
+ </region>
+ <region iso3166="SC">
+ <currency iso4217="SCR" >
+ </currency>
+ </region>
+ <region iso3166="SD">
+ <currency iso4217="SDD" >
+ </currency>
+ </region>
+ <region iso3166="SE">
+ <currency iso4217="SEK" >
+ </currency>
+ </region>
+ <region iso3166="SG">
+ <currency iso4217="SGD" >
+ </currency>
+ </region>
+ <region iso3166="SH">
+ <currency iso4217="SHP" >
+ </currency>
+ </region>
+ <region iso3166="SI">
+ <currency iso4217="SIT" >
+ </currency>
+ </region>
+ <region iso3166="SJ">
+ <currency iso4217="NOK" >
+ </currency>
+ </region>
+ <region iso3166="SK">
+ <currency iso4217="SKK" >
+ </currency>
+ </region>
+ <region iso3166="SL">
+ <currency iso4217="SLL" >
+ </currency>
+ </region>
+ <region iso3166="SM">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="SN">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="SO">
+ <currency iso4217="SOS" >
+ </currency>
+ </region>
+ <region iso3166="SR">
+ <currency iso4217="SRG" >
+ </currency>
+ </region>
+ <region iso3166="ST">
+ <currency iso4217="STD" >
+ </currency>
+ </region>
+ <region iso3166="SV">
+ <currency iso4217="SVC" >
+ </currency>
+ </region>
+ <region iso3166="SY">
+ <currency iso4217="SYP" >
+ </currency>
+ </region>
+ <region iso3166="SZ">
+ <currency iso4217="SZL" >
+ </currency>
+ </region>
+ <region iso3166="TC">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="TD">
+ <currency iso4217="XAF" >
+ </currency>
+ </region>
+ <region iso3166="TF">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="TG">
+ <currency iso4217="XOF" >
+ </currency>
+ </region>
+ <region iso3166="TH">
+ <currency iso4217="THB" >
+ </currency>
+ </region>
+ <region iso3166="TJ">
+ <currency iso4217="TJS" >
+ </currency>
+ </region>
+ <region iso3166="TK">
+ <currency iso4217="NZD" >
+ </currency>
+ </region>
+ <region iso3166="TL">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="TM">
+ <currency iso4217="TMM" >
+ </currency>
+ </region>
+ <region iso3166="TN">
+ <currency iso4217="TND" >
+ </currency>
+ </region>
+ <region iso3166="TO">
+ <currency iso4217="TOP" >
+ </currency>
+ </region>
+ <region iso3166="TR">
+ <currency iso4217="TRL" >
+ </currency>
+ </region>
+ <region iso3166="TT">
+ <currency iso4217="TTD" >
+ </currency>
+ </region>
+ <region iso3166="TV">
+ <currency iso4217="AUD" >
+ </currency>
+ </region>
+ <region iso3166="TW">
+ <currency iso4217="TWD" >
+ </currency>
+ </region>
+ <region iso3166="TZ">
+ <currency iso4217="TZS" >
+ </currency>
+ </region>
+ <region iso3166="UA">
+ <currency iso4217="UAH" >
+ </currency>
+ </region>
+ <region iso3166="UG">
+ <currency iso4217="UGX" >
+ </currency>
+ </region>
+ <region iso3166="UM">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="US">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="UY">
+ <currency iso4217="UYU" >
+ </currency>
+ </region>
+ <region iso3166="UZ">
+ <currency iso4217="UZS" >
+ </currency>
+ </region>
+ <region iso3166="VA">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="VC">
+ <currency iso4217="XCD" >
+ </currency>
+ </region>
+ <region iso3166="VE">
+ <currency iso4217="VEB" >
+ </currency>
+ </region>
+ <region iso3166="VG">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="VI">
+ <currency iso4217="USD" >
+ </currency>
+ </region>
+ <region iso3166="VN">
+ <currency iso4217="VND" >
+ </currency>
+ </region>
+ <region iso3166="VU">
+ <currency iso4217="VUV" >
+ </currency>
+ </region>
+ <region iso3166="WF">
+ <currency iso4217="XPF" >
+ </currency>
+ </region>
+ <region iso3166="WS">
+ <currency iso4217="WST" >
+ </currency>
+ </region>
+ <region iso3166="YE">
+ <currency iso4217="YER" >
+ </currency>
+ </region>
+ <region iso3166="YT">
+ <currency iso4217="EUR" >
+ </currency>
+ </region>
+ <region iso3166="YU">
+ <currency iso4217="YUM" >
+ </currency>
+ </region>
+ <region iso3166="ZA">
+ <currency iso4217="ZAR" >
+ </currency>
+ </region>
+ <region iso3166="ZM">
+ <currency iso4217="ZMK" >
+ </currency>
+ </region>
+ <region iso3166="ZW">
+ <currency iso4217="ZWD" >
+ </currency>
+ </region>
+ </currencyData>
+</supplementalData>