internal/cldrtree: package for creating cldr tables

Creates an index that takes into account CLDR
inheritance and aliasing.

This is a different, more systematic approach of
storing CLDR data that we have done in the past
and is necessary to handle the more unwieldy
date and also unit data.

Change-Id: I229e62325cedeb76c53ac00cc2650805ae973297
Reviewed-on: https://go-review.googlesource.com/72211
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
diff --git a/internal/cldrtree/cldrtree.go b/internal/cldrtree/cldrtree.go
new file mode 100644
index 0000000..a0a6b90
--- /dev/null
+++ b/internal/cldrtree/cldrtree.go
@@ -0,0 +1,347 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package cldrtree builds and generates a CLDR index file, including all
+// inheritance.
+//
+package cldrtree
+
+// cldrtree stores CLDR data in a tree-like structure called Tree. In the CLDR
+// data each branch in the tree is indicated by either an element name or an
+// attribute value. A Tree does not distinguish between these two cases, but
+// rather assumes that all branches can be accessed by an enum with a compact
+// range of positive integer values starting from 0.
+//
+// Each Tree consists of three parts:
+//    - a slice mapping compact language identifiers to an offset into a set of
+//      indices,
+//    - a set of indices, stored as a large blob of uint16 values that encode
+//      the actual tree structure of data, and
+//    - a set of buckets that each holds a collection of strings.
+// each of which is explained in more detail below.
+//
+//
+// Tree lookup
+// A tree lookup is done by providing a locale and a "path", which is a
+// sequence of enum values. The search starts with getting the index for the
+// given locale and then incrementally jumping into the index using the path
+// values. If an element cannot be found in the index, the search starts anew
+// for the locale's parent locale. The path may change during lookup by means
+// of aliasing, described below.
+//
+// Buckets
+// Buckets hold the actual string data of the leaf values of the CLDR tree.
+// This data is stored in buckets, rather than one large string, for multiple
+// reasons:
+//   - it allows representing leaf values more compactly, by storing all leaf
+//     values in a single bucket and then needing only needing a uint16 to index
+//     into this bucket for all leaf values,
+//   - (TBD) allow multiple trees to share subsets of buckets, mostly to allow
+//     linking in a smaller amount of data if only a subset of the buckets is
+//     needed,
+//   - to be nice to go fmt and the compiler.
+//
+// indices
+// An index is a slice of uint16 for which the values are interpreted in one of
+// two ways: as a node or a set of leaf values.
+// A set of leaf values has the following form:
+//      <max_size>, <bucket>, <offset>...
+// max_size indicates the maximum enum value for which an offset is defined.
+// An offset value of 0xFFFF (missingValue) also indicates an undefined value.
+// If defined offset indicates the offset within the given bucket of the string.
+// A node value has the following form:
+//      <max_size>, <offset_or_alias>...
+// max_size indicates the maximum value for which an offset is defined.
+// A missing offset may also be indicated with 0. If the high bit (0x8000, or
+// inheritMask) is not set, the offset points to the offset within the index
+// for the current locale.
+// An offset with high bit set is an alias. In this case the uint16 has the form
+//       bits:
+//         15: 1
+//      14-12: negative offset into path relative to current position
+//       0-11: new enum value for path element.
+// On encountering an alias, the path is modified accordingly and the lookup is
+// restarted for the given locale.
+
+import (
+	"fmt"
+	"reflect"
+	"regexp"
+	"strings"
+	"unicode/utf8"
+
+	"golang.org/x/text/internal/gen"
+	"golang.org/x/text/language"
+	"golang.org/x/text/unicode/cldr"
+)
+
+// TODO:
+// - allow two Trees to share the same set of buckets.
+
+// A Builder allows storing CLDR data in compact form.
+type Builder struct {
+	table []string
+
+	rootMeta    *metaData
+	locales     []locale
+	strToBucket map[string]stringInfo
+	buckets     [][]byte
+	enums       []*enum
+	err         error
+
+	// Stats
+	size        int
+	sizeAll     int
+	bucketWaste int
+}
+
+const (
+	maxBucketSize = 8 * 1024 // 8K
+	maxStrlen     = 254      // allow 0xFF sentinel
+)
+
+func (b *Builder) setError(err error) {
+	if b.err == nil {
+		b.err = err
+	}
+}
+
+func (b *Builder) addString(data string) stringInfo {
+	data = b.makeString(data)
+	info, ok := b.strToBucket[data]
+	if !ok {
+		b.size += len(data)
+		x := len(b.buckets) - 1
+		bucket := b.buckets[x]
+		if len(bucket)+len(data) < maxBucketSize {
+			info.bucket = uint16(x)
+			info.bucketPos = uint16(len(bucket))
+			b.buckets[x] = append(bucket, data...)
+		} else {
+			info.bucket = uint16(len(b.buckets))
+			info.bucketPos = 0
+			b.buckets = append(b.buckets, []byte(data))
+		}
+		b.strToBucket[data] = info
+	}
+	return info
+}
+
+func (b *Builder) addStringToBucket(data string, bucket uint16) stringInfo {
+	data = b.makeString(data)
+	info, ok := b.strToBucket[data]
+	if !ok || info.bucket != bucket {
+		if ok {
+			b.bucketWaste += len(data)
+		}
+		b.size += len(data)
+		bk := b.buckets[bucket]
+		info.bucket = bucket
+		info.bucketPos = uint16(len(bk))
+		b.buckets[bucket] = append(bk, data...)
+		b.strToBucket[data] = info
+	}
+	return info
+}
+
+func (b *Builder) makeString(data string) string {
+	if len(data) > maxStrlen {
+		b.setError(fmt.Errorf("string %q exceeds maximum length of %d", data, maxStrlen))
+		data = data[:maxStrlen]
+		for i := len(data) - 1; i > len(data)-4; i-- {
+			if utf8.RuneStart(data[i]) {
+				data = data[:i]
+				break
+			}
+		}
+	}
+	data = string([]byte{byte(len(data))}) + data
+	b.sizeAll += len(data)
+	return data
+}
+
+type stringInfo struct {
+	bufferPos uint32
+	bucket    uint16
+	bucketPos uint16
+}
+
+// New creates a new Builder.
+func New(tableName string) *Builder {
+	b := &Builder{
+		strToBucket: map[string]stringInfo{},
+		buckets:     [][]byte{nil}, // initialize with first bucket.
+	}
+	b.rootMeta = &metaData{
+		b:        b,
+		typeInfo: &typeInfo{},
+	}
+	return b
+}
+
+// Gen writes all the tables and types for the collected data.
+func (b *Builder) Gen(w *gen.CodeWriter) error {
+	t, err := build(b)
+	if err != nil {
+		return err
+	}
+	generate(b, t, w)
+	return nil
+}
+
+type locale struct {
+	tag  language.Tag
+	root *Index
+}
+
+// Locale creates an index for the given locale.
+func (b *Builder) Locale(t language.Tag) *Index {
+	index := &Index{
+		meta: b.rootMeta,
+	}
+	b.locales = append(b.locales, locale{tag: t, root: index})
+	return index
+}
+
+// An Index holds a map of either leaf values or other indices.
+type Index struct {
+	meta *metaData
+
+	subIndex []*Index
+	values   []keyValue
+}
+
+func (i *Index) setError(err error) { i.meta.b.setError(err) }
+
+type keyValue struct {
+	key   enumIndex
+	value stringInfo
+}
+
+// Element is a CLDR XML element.
+type Element interface {
+	GetCommon() *cldr.Common
+}
+
+// Index creates a subindex where the type and enum values are not shared
+// with siblings by default. The name is derived from the elem. If elem is
+// an alias reference, the alias will be resolved and linked. If elem is nil
+// Index returns nil.
+func (i *Index) Index(elem Element, opt ...Option) *Index {
+	if elem == nil || reflect.ValueOf(elem).IsNil() {
+		return nil
+	}
+	c := elem.GetCommon()
+	o := &options{
+		parent: i,
+		name:   c.GetCommon().Element(),
+	}
+	o.fill(opt)
+	o.setAlias(elem)
+	return i.subIndexForKey(o)
+}
+
+// IndexWithName is like Section but derives the name from the given name.
+func (i *Index) IndexWithName(name string, opt ...Option) *Index {
+	o := &options{parent: i, name: name}
+	o.fill(opt)
+	return i.subIndexForKey(o)
+}
+
+// IndexFromType creates a subindex the value of tye type attribute as key. It
+// will also configure the Index to share the enumeration values with all
+// sibling values. If elem is an alias, it will be resolved and linked.
+func (i *Index) IndexFromType(elem Element, opts ...Option) *Index {
+	o := &options{
+		parent: i,
+		name:   elem.GetCommon().Type,
+	}
+	o.fill(opts)
+	o.setAlias(elem)
+	useSharedType()(o)
+	return i.subIndexForKey(o)
+}
+
+// IndexFromAlt creates a subindex the value of tye alt attribute as key. It
+// will also configure the Index to share the enumeration values with all
+// sibling values. If elem is an alias, it will be resolved and linked.
+func (i *Index) IndexFromAlt(elem Element, opts ...Option) *Index {
+	o := &options{
+		parent: i,
+		name:   elem.GetCommon().Alt,
+	}
+	o.fill(opts)
+	o.setAlias(elem)
+	useSharedType()(o)
+	return i.subIndexForKey(o)
+}
+
+func (i *Index) subIndexForKey(opts *options) *Index {
+	key := opts.name
+	if len(i.values) > 0 {
+		panic(fmt.Errorf("cldrtree: adding Index for %q when value already exists", key))
+	}
+	meta := i.meta.sub(key, opts)
+	for _, x := range i.subIndex {
+		if x.meta == meta {
+			return x
+		}
+	}
+	if alias := opts.alias; alias != nil {
+		if a := alias.GetCommon().Alias; a != nil {
+			if a.Source != "locale" {
+				i.setError(fmt.Errorf("cldrtree: non-locale alias not supported %v", a.Path))
+			}
+			if meta.inheritOffset < 0 {
+				i.setError(fmt.Errorf("cldrtree: alias was already set %v", a.Path))
+			}
+			path := a.Path
+			for ; strings.HasPrefix(path, "../"); path = path[len("../"):] {
+				meta.inheritOffset--
+			}
+			m := aliasRe.FindStringSubmatch(path)
+			if m == nil {
+				i.setError(fmt.Errorf("cldrtree: could not parse alias %q", a.Path))
+			} else {
+				key := m[4]
+				if key == "" {
+					key = m[1]
+				}
+				meta.inheritIndex = key
+			}
+		}
+	}
+	x := &Index{meta: meta}
+	i.subIndex = append(i.subIndex, x)
+	return x
+}
+
+var aliasRe = regexp.MustCompile(`^([a-zA-Z]+)(\[@([a-zA-Z-]+)='([a-zA-Z-]+)'\])?`)
+
+// SetValue sets the value, the data from a CLDR XML element, for the given key.
+func (i *Index) SetValue(key string, value Element, opt ...Option) {
+	if len(i.subIndex) > 0 {
+		panic(fmt.Errorf("adding value for key %q when index already exists", key))
+	}
+	o := &options{parent: i}
+	o.fill(opt)
+	c := value.GetCommon()
+	if c.Alias != nil {
+		i.setError(fmt.Errorf("cldrtree: alias not supported for SetValue %v", c.Alias.Path))
+	}
+	i.setValue(key, c.Data(), o)
+}
+
+func (i *Index) setValue(key, data string, o *options) {
+	index, _ := i.meta.typeInfo.lookupSubtype(key, o)
+	kv := keyValue{key: index}
+	if len(i.values) > 0 {
+		// Add string to the same bucket as the other values.
+		bucket := i.values[0].value.bucket
+		kv.value = i.meta.b.addStringToBucket(data, bucket)
+	} else {
+		kv.value = i.meta.b.addString(data)
+	}
+	i.values = append(i.values, kv)
+}
diff --git a/internal/cldrtree/cldrtree_test.go b/internal/cldrtree/cldrtree_test.go
new file mode 100644
index 0000000..6907ee6
--- /dev/null
+++ b/internal/cldrtree/cldrtree_test.go
@@ -0,0 +1,427 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldrtree
+
+import (
+	"bytes"
+	"flag"
+	"io/ioutil"
+	"math/rand"
+	"path/filepath"
+	"reflect"
+	"regexp"
+	"testing"
+
+	"golang.org/x/text/internal/gen"
+	"golang.org/x/text/language"
+	"golang.org/x/text/unicode/cldr"
+)
+
+var genOutput = flag.Bool("gen", false, "generate output files")
+
+func TestAliasRegexp(t *testing.T) {
+	testCases := []struct {
+		alias string
+		want  []string
+	}{{
+		alias: "miscPatterns[@numberSystem='latn']",
+		want: []string{
+			"miscPatterns[@numberSystem='latn']",
+			"miscPatterns",
+			"[@numberSystem='latn']",
+			"numberSystem",
+			"latn",
+		},
+	}, {
+		alias: `calendar[@type='greg-foo']/days/`,
+		want: []string{
+			"calendar[@type='greg-foo']",
+			"calendar",
+			"[@type='greg-foo']",
+			"type",
+			"greg-foo",
+		},
+	}, {
+		alias: "eraAbbr",
+		want: []string{
+			"eraAbbr",
+			"eraAbbr",
+			"",
+			"",
+			"",
+		},
+	}, {
+		// match must be anchored at beginning.
+		alias: `../calendar[@type='gregorian']/days/`,
+	}}
+	for _, tc := range testCases {
+		t.Run(tc.alias, func(t *testing.T) {
+			got := aliasRe.FindStringSubmatch(tc.alias)
+			if !reflect.DeepEqual(got, tc.want) {
+				t.Errorf("got %v; want %v", got, tc.want)
+			}
+		})
+	}
+}
+
+func TestBuild(t *testing.T) {
+	tree1, _ := loadTestdata(t, "test1")
+	tree2, _ := loadTestdata(t, "test2")
+
+	// Constants for second test test
+	const (
+		calendar = iota
+		field
+	)
+	const (
+		month = iota
+		era
+		filler
+		cyclicNameSet
+	)
+	const (
+		abbreviated = iota
+		narrow
+		wide
+	)
+
+	testCases := []struct {
+		desc      string
+		tree      *Tree
+		locale    string
+		path      []uint16
+		isFeature bool
+		result    string
+	}{{
+		desc:   "und/chinese month format wide m1",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 0, month, 0, wide, 0),
+		result: "cM01",
+	}, {
+		desc:   "und/chinese month format wide m12",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 0, month, 0, wide, 11),
+		result: "cM12",
+	}, {
+		desc:   "und/non-existing value",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 0, month, 0, wide, 13),
+		result: "",
+	}, {
+		desc:   "und/dangi:chinese month format wide",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 1, month, 0, wide, 0),
+		result: "cM01",
+	}, {
+		desc:   "und/chinese month format abbreviated:wide",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 0, month, 0, abbreviated, 0),
+		result: "cM01",
+	}, {
+		desc:   "und/chinese month format narrow:wide",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 0, month, 0, narrow, 0),
+		result: "cM01",
+	}, {
+		desc:   "und/gregorian month format wide",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 2, month, 0, wide, 1),
+		result: "gM02",
+	}, {
+		desc:   "und/gregorian month format:stand-alone narrow",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 2, month, 0, narrow, 0),
+		result: "1",
+	}, {
+		desc:   "und/gregorian month stand-alone:format abbreviated",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 2, month, 1, abbreviated, 0),
+		result: "gM01",
+	}, {
+		desc:   "und/gregorian month stand-alone:format wide ",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 2, month, 1, abbreviated, 0),
+		result: "gM01",
+	}, {
+		desc:   "und/dangi:chinese format narrow:wide ",
+		tree:   tree1,
+		locale: "und",
+		path:   path(calendar, 1, month, 0, narrow, 3),
+		result: "cM04",
+	}, {
+		desc:   "und/field era displayname 0",
+		tree:   tree2,
+		locale: "und",
+		path:   path(field, 0, 0, 0),
+		result: "Era",
+	}, {
+		desc:   "en/field era displayname 0",
+		tree:   tree2,
+		locale: "en",
+		path:   path(field, 0, 0, 0),
+		result: "era",
+	}, {
+		desc:   "und/calendar hebrew format wide 7-leap",
+		tree:   tree2,
+		locale: "und",
+		path:   path(calendar, 7, month, 0, wide, 13),
+		result: "Adar II",
+	}, {
+		desc:   "en-GB:en-001:en:und/calendar hebrew format wide 7-leap",
+		tree:   tree2,
+		locale: "en-GB",
+		path:   path(calendar, 7, month, 0, wide, 13),
+		result: "Adar II",
+	}, {
+		desc:   "und/buddhist month format wide 11",
+		tree:   tree2,
+		locale: "und",
+		path:   path(calendar, 0, month, 0, wide, 11),
+		result: "genWideM12",
+	}, {
+		desc:   "en-GB/gregorian month stand-alone narrow 2",
+		tree:   tree2,
+		locale: "en-GB",
+		path:   path(calendar, 6, month, 1, narrow, 2),
+		result: "gbNarrowM3",
+	}, {
+		desc:   "en-GB/gregorian month format narrow 3/missing in en-GB",
+		tree:   tree2,
+		locale: "en-GB",
+		path:   path(calendar, 6, month, 0, narrow, 3),
+		result: "enNarrowM4",
+	}, {
+		desc:   "en-GB/gregorian month format narrow 3/missing in en and en-GB",
+		tree:   tree2,
+		locale: "en-GB",
+		path:   path(calendar, 6, month, 0, narrow, 6),
+		result: "gregNarrowM7",
+	}, {
+		desc:   "en-GB/gregorian month format narrow 3/missing in en and en-GB",
+		tree:   tree2,
+		locale: "en-GB",
+		path:   path(calendar, 6, month, 0, narrow, 6),
+		result: "gregNarrowM7",
+	}, {
+		desc:      "en-GB/gregorian era narrow",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(calendar, 6, era, abbreviated, 0, 1),
+		isFeature: true,
+		result:    "AD",
+	}, {
+		desc:      "en-GB/gregorian era narrow",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(calendar, 6, era, narrow, 0, 0),
+		isFeature: true,
+		result:    "BC",
+	}, {
+		desc:      "en-GB/gregorian era narrow",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(calendar, 6, era, wide, 1, 0),
+		isFeature: true,
+		result:    "Before Common Era",
+	}, {
+		desc:      "en-GB/dangi:chinese cyclicName, months, format, narrow:abbreviated 2",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(calendar, 1, cyclicNameSet, 3, 0, 1, 1),
+		isFeature: true,
+		result:    "year2",
+	}, {
+		desc:   "en-GB/field era-narrow ",
+		tree:   tree2,
+		locale: "en-GB",
+		path:   path(field, 2, 0, 0),
+		result: "era",
+	}, {
+		desc:      "en-GB/field month-narrow relativeTime future one",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(field, 5, 2, 0, 1),
+		isFeature: true,
+		result:    "001NarrowFutMOne",
+	}, {
+		// Don't fall back to the one of "en".
+		desc:      "en-GB/field month-short relativeTime past one:other",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(field, 4, 2, 1, 1),
+		isFeature: true,
+		result:    "001ShortPastMOther",
+	}, {
+		desc:      "en-GB/field month relativeTime future two:other",
+		tree:      tree2,
+		locale:    "en-GB",
+		path:      path(field, 3, 2, 0, 2),
+		isFeature: true,
+		result:    "enFutMOther",
+	}}
+
+	for _, tc := range testCases {
+		t.Run(tc.desc, func(t *testing.T) {
+			tag, _ := language.CompactIndex(language.MustParse(tc.locale))
+			s := tc.tree.lookup(tag, tc.isFeature, tc.path...)
+			if s != tc.result {
+				t.Errorf("got %q; want %q", s, tc.result)
+			}
+		})
+	}
+}
+
+func path(e ...uint16) []uint16 { return e }
+
+func TestGen(t *testing.T) {
+	testCases := []string{"test1", "test2"}
+	for _, tc := range testCases {
+		t.Run(tc, func(t *testing.T) {
+			_, got := loadTestdata(t, tc)
+
+			// Remove sizes that may vary per architecture.
+			re := regexp.MustCompile("// Size: [0-9]*")
+			got = re.ReplaceAllLiteral(got, []byte("// Size: xxxx"))
+			re = regexp.MustCompile("// Total table size [0-9]*")
+			got = re.ReplaceAllLiteral(got, []byte("// Total table size: xxxx"))
+
+			file := filepath.Join("testdata", tc, "output.go")
+			if *genOutput {
+				ioutil.WriteFile(file, got, 0700)
+				t.SkipNow()
+			}
+
+			b, err := ioutil.ReadFile(file)
+			if err != nil {
+				t.Fatalf("failed to open file: %v", err)
+			}
+			if want := string(b); string(got) != want {
+				t.Log(string(got))
+				t.Errorf("files differ")
+			}
+		})
+	}
+}
+
+func loadTestdata(t *testing.T, test string) (tree *Tree, file []byte) {
+	b := New("test")
+
+	var d cldr.Decoder
+
+	data, err := d.DecodePath(filepath.Join("testdata", test))
+	if err != nil {
+		t.Fatalf("error decoding testdata: %v", err)
+	}
+
+	context := Enum("context")
+	// Align era with width values.
+	width := Enum("width", "abbreviated", "narrow", "wide")
+	eraType := Enum("era", "eraAbbr", "eraNarrow", "eraNames")
+	r := rand.New(rand.NewSource(0))
+
+	for _, loc := range data.Locales() {
+		ldml := data.RawLDML(loc)
+		x := b.Locale(language.Make(loc))
+
+		if x := x.Index(ldml.Dates.Calendars); x != nil {
+			for _, cal := range ldml.Dates.Calendars.Calendar {
+				x := x.IndexFromType(cal)
+				if x := x.Index(cal.Months); x != nil {
+					for _, mc := range cal.Months.MonthContext {
+						x := x.IndexFromType(mc, context)
+						for _, mw := range mc.MonthWidth {
+							x := x.IndexFromType(mw, width)
+							for _, m := range mw.Month {
+								x.SetValue(m.Type+m.Yeartype, m)
+							}
+						}
+					}
+				}
+				if x := x.Index(cal.CyclicNameSets); x != nil {
+					for _, cns := range cal.CyclicNameSets.CyclicNameSet {
+						x := x.IndexFromType(cns)
+						for _, cc := range cns.CyclicNameContext {
+							x := x.IndexFromType(cc, context)
+							for _, cw := range cc.CyclicNameWidth {
+								x := x.IndexFromType(cw, width)
+								for _, c := range cw.CyclicName {
+									x.SetValue(c.Type, c)
+								}
+							}
+						}
+					}
+				}
+				if x := x.Index(cal.Eras); x != nil {
+					opts := []Option{eraType, SharedType()}
+					if x := x.Index(cal.Eras.EraNames, opts...); x != nil {
+						for _, e := range cal.Eras.EraNames.Era {
+							x.IndexFromAlt(e).SetValue(e.Type, e)
+						}
+					}
+					if x := x.Index(cal.Eras.EraAbbr, opts...); x != nil {
+						for _, e := range cal.Eras.EraAbbr.Era {
+							x.IndexFromAlt(e).SetValue(e.Type, e)
+						}
+					}
+					if x := x.Index(cal.Eras.EraNarrow, opts...); x != nil {
+						for _, e := range cal.Eras.EraNarrow.Era {
+							x.IndexFromAlt(e).SetValue(e.Type, e)
+						}
+					}
+				}
+				{
+					// Ensure having more than 2 buckets.
+					f := x.IndexWithName("filler")
+					b := make([]byte, maxStrlen)
+					opt := &options{parent: x}
+					r.Read(b)
+					f.setValue("0", string(b), opt)
+				}
+			}
+		}
+		if x := x.Index(ldml.Dates.Fields); x != nil {
+			for _, f := range ldml.Dates.Fields.Field {
+				x := x.IndexFromType(f)
+				for _, d := range f.DisplayName {
+					x.Index(d).SetValue("", d)
+				}
+				for _, r := range f.Relative {
+					x.Index(r).SetValue(r.Type, r)
+				}
+				for _, rt := range f.RelativeTime {
+					x := x.Index(rt).IndexFromType(rt)
+					for _, p := range rt.RelativeTimePattern {
+						x.SetValue(p.Count, p)
+					}
+				}
+				for _, rp := range f.RelativePeriod {
+					x.Index(rp).SetValue("", rp)
+				}
+			}
+		}
+	}
+
+	tree, err = build(b)
+	if err != nil {
+		t.Fatal("error building tree:", err)
+	}
+	w := gen.NewCodeWriter()
+	generate(b, tree, w)
+	buf := &bytes.Buffer{}
+	if _, err = w.WriteGo(buf, "test"); err != nil {
+		t.Fatal("error generating code:", err)
+	}
+	return tree, buf.Bytes()
+}
diff --git a/internal/cldrtree/generate.go b/internal/cldrtree/generate.go
new file mode 100644
index 0000000..e06459c
--- /dev/null
+++ b/internal/cldrtree/generate.go
@@ -0,0 +1,138 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldrtree
+
+import (
+	"bytes"
+	"fmt"
+	"io"
+	"reflect"
+	"strconv"
+	"strings"
+
+	"golang.org/x/text/internal/gen"
+)
+
+func generate(b *Builder, t *Tree, w *gen.CodeWriter) {
+	fmt.Fprintln(w, `import "golang.org/x/text/internal/cldrtree"`)
+	fmt.Fprintln(w)
+
+	fmt.Fprintf(w, "var tree = &cldrtree.Tree{locales, indices, buckets}\n\n")
+
+	w.WriteComment("Path values:\n" + b.stats())
+	fmt.Fprintln(w)
+
+	// Generate enum types.
+	for _, e := range b.enums {
+		// Build enum types.
+		w.WriteComment("%s specifies a property of a CLDR field.", e.name)
+		fmt.Fprintf(w, "type %s int\n", e.name)
+		fmt.Fprintln(w, "const (")
+		fmt.Fprintf(w, "%v %v = iota\n", toCamel(e.keys[0]), e.name)
+		for _, s := range e.keys[1:] {
+			fmt.Fprintln(w, toCamel(s))
+		}
+		fmt.Fprintln(w, ")")
+	}
+
+	w.WriteVar("locales", t.Locales)
+	w.WriteVar("indices", t.Indices)
+
+	// Generate string buckets.
+	fmt.Fprintln(w, "var buckets = []string{")
+	for i := range t.Buckets {
+		fmt.Fprintf(w, "bucket%d,\n", i)
+	}
+	fmt.Fprint(w, "}\n\n")
+	w.Size += int(reflect.TypeOf("").Size()) * len(t.Buckets)
+
+	// Generate string buckets.
+	for i, bucket := range t.Buckets {
+		w.WriteVar(fmt.Sprint("bucket", i), bucket)
+	}
+}
+
+func toCamel(s string) string {
+	p := strings.Split(s, "-")
+	for i, s := range p[1:] {
+		p[i+1] = strings.Title(s)
+	}
+	return strings.Join(p, "")
+}
+
+func (b *Builder) stats() string {
+	w := &bytes.Buffer{}
+
+	b.rootMeta.validate()
+	for _, es := range b.enums {
+		fmt.Fprintf(w, "<%s>\n", es.name)
+		for _, s := range es.keys {
+			fmt.Fprintf(w, "  - %s\n", s)
+		}
+	}
+	fmt.Fprintln(w)
+	printEnums(w, b.rootMeta.typeInfo, 0)
+	fmt.Fprintln(w)
+	fmt.Fprintln(w, "Nr elem:           ", len(b.strToBucket))
+	fmt.Fprintln(w, "uniqued size:      ", b.size)
+	fmt.Fprintln(w, "total string size: ", b.sizeAll)
+	fmt.Fprintln(w, "bucket waste:      ", b.bucketWaste)
+
+	return w.String()
+}
+
+func printEnums(w io.Writer, s *typeInfo, indent int) {
+	idStr := strings.Repeat("  ", indent) + "- "
+	e := s.enum
+	if e == nil {
+		if len(s.entries) > 0 {
+			panic(fmt.Errorf("has entries but no enum values: %#v", s.entries))
+		}
+		return
+	}
+	if e.name != "" {
+		fmt.Fprintf(w, "%s<%s>\n", idStr, e.name)
+	} else {
+		for i := 0; i < len(e.keys); i++ {
+			fmt.Fprint(w, idStr)
+			// fmt.Fprint(w, "- ")
+			k := e.keys[i]
+			if u, err := strconv.ParseUint(k, 10, 16); err == nil {
+				fmt.Fprintf(w, "%s", k)
+				// Skip contiguous integers
+				var v, last uint64
+				for i++; i < len(e.keys); i++ {
+					k = e.keys[i]
+					if v, err = strconv.ParseUint(k, 10, 16); err != nil {
+						break
+					}
+					last = v
+				}
+				if u < last {
+					fmt.Fprintf(w, `..%d`, last)
+				}
+				fmt.Fprintln(w)
+				if err != nil {
+					fmt.Fprintf(w, "%s%s\n", idStr, k)
+				}
+			} else if k == "" {
+				fmt.Fprintln(w, `""`)
+			} else {
+				fmt.Fprintf(w, "%s\n", k)
+			}
+			if !s.sharedKeys() {
+				if e := s.entries[enumIndex(i)]; e != nil {
+					printEnums(w, e, indent+1)
+				}
+			}
+		}
+	}
+	if s.sharedKeys() {
+		for _, v := range s.entries {
+			printEnums(w, v, indent+1)
+			break
+		}
+	}
+}
diff --git a/internal/cldrtree/option.go b/internal/cldrtree/option.go
new file mode 100644
index 0000000..069d560
--- /dev/null
+++ b/internal/cldrtree/option.go
@@ -0,0 +1,88 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldrtree
+
+import (
+	"reflect"
+
+	"golang.org/x/text/unicode/cldr"
+)
+
+// An Option configures an Index.
+type Option func(*options)
+
+type options struct {
+	parent *Index
+
+	name  string
+	alias *cldr.Common
+
+	sharedType  *typeInfo
+	sharedEnums *enum
+}
+
+func (o *options) fill(opt []Option) {
+	for _, f := range opt {
+		f(o)
+	}
+}
+
+// aliasOpt sets an alias from the given node, if the node defines one.
+func (o *options) setAlias(n Element) {
+	if n != nil && !reflect.ValueOf(n).IsNil() {
+		o.alias = n.GetCommon()
+	}
+}
+
+// Enum defines a enumeration type. The resulting option may be passed for the
+// construction of multiple Indexes, which they will share the same enum values.
+// Calling Gen on a Builder will generate the Enum for the given name. The
+// optional values fix the values for the given identifier to the argument
+// position (starting at 0). Other values may still be added and will be
+// assigned to subsequent values.
+func Enum(name string, value ...string) Option {
+	enum := &enum{name: name, keyMap: map[string]enumIndex{}}
+	for _, e := range value {
+		enum.lookup(e)
+	}
+	return func(o *options) {
+		found := false
+		for _, e := range o.parent.meta.b.enums {
+			if e.name == enum.name {
+				found = true
+				break
+			}
+		}
+		if !found {
+			o.parent.meta.b.enums = append(o.parent.meta.b.enums, enum)
+		}
+		o.sharedEnums = enum
+	}
+}
+
+// TODO:
+// // RenameFunc renames enum values. This is mostly used to sanitize enum values
+// // to make them proper identifiers.
+// func RenameFunc(rename func(string) string) Option {
+// 	return nil
+// }
+
+// SharedType returns an option which causes all Indexes to which this option is
+// passed to have the same type.
+func SharedType() Option {
+	info := &typeInfo{}
+	return func(o *options) { o.sharedType = info }
+}
+
+func useSharedType() Option {
+	return func(o *options) {
+		sub := o.parent.meta.typeInfo.keyTypeInfo
+		if sub == nil {
+			sub = &typeInfo{}
+			o.parent.meta.typeInfo.keyTypeInfo = sub
+		}
+		o.sharedType = sub
+	}
+}
diff --git a/internal/cldrtree/testdata/test1/common/main/root.xml b/internal/cldrtree/testdata/test1/common/main/root.xml
new file mode 100644
index 0000000..f9d3b5d
--- /dev/null
+++ b/internal/cldrtree/testdata/test1/common/main/root.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ldml>
+	<identity>
+		<language type="root"/>
+	</identity>
+	<dates>
+		<calendars>
+			<calendar type="chinese">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">cM01</month>
+							<month type="2">cM02</month>
+							<month type="3">cM03</month>
+							<month type="4">cM04</month>
+							<month type="5">cM05</month>
+							<month type="6">cM06</month>
+							<month type="7">cM07</month>
+							<month type="8">cM08</month>
+							<month type="9">cM09</month>
+							<month type="10">cM10</month>
+							<month type="11">cM11</month>
+							<month type="12">cM12</month>
+						</monthWidth>
+					</monthContext>
+				</months>
+			</calendar>
+			<calendar type="dangi">
+				<months>
+					<alias source="locale" path="../../calendar[@type='chinese']/months"/>
+				</months>
+			</calendar>
+			<calendar type="gregorian">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">gM01</month>
+							<month type="2">gM02</month>
+							<month type="3">gM03</month>
+							<month type="4">gM04</month>
+							<month type="5">gM05</month>
+							<month type="6">gM06</month>
+							<month type="7">gM07</month>
+							<month type="8">gM08</month>
+							<month type="9">gM09</month>
+							<month type="10">gM10</month>
+							<month type="11">gM11</month>
+							<month type="12">gM12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">1</month>
+							<month type="2">2</month>
+							<month type="3">3</month>
+							<month type="4">4</month>
+							<month type="5">5</month>
+							<month type="6">6</month>
+							<month type="7">7</month>
+							<month type="8">8</month>
+							<month type="9">9</month>
+							<month type="10">10</month>
+							<month type="11">11</month>
+							<month type="12">12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+			</calendar>
+		</calendars>
+	</dates>
+</ldml>
diff --git a/internal/cldrtree/testdata/test1/output.go b/internal/cldrtree/testdata/test1/output.go
new file mode 100755
index 0000000..1a03679
--- /dev/null
+++ b/internal/cldrtree/testdata/test1/output.go
@@ -0,0 +1,321 @@
+// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
+
+package test
+
+import "golang.org/x/text/internal/cldrtree"
+
+var tree = &cldrtree.Tree{locales, indices, buckets}
+
+// Path values:
+// <context>
+//   - format
+//   - stand-alone
+// <width>
+//   - abbreviated
+//   - narrow
+//   - wide
+//
+// - calendars
+//   - chinese
+//   - dangi
+//   - gregorian
+//     - months
+//       - <context>
+//         - <width>
+//           - 1..12
+//     - filler
+//       - 0
+//
+// Nr elem:            39
+// uniqued size:       912
+// total string size:  912
+// bucket waste:       0
+
+// context specifies a property of a CLDR field.
+type context int
+
+const (
+	format context = iota
+	standAlone
+)
+
+// width specifies a property of a CLDR field.
+type width int
+
+const (
+	abbreviated width = iota
+	narrow
+	wide
+)
+
+var locales = []uint32{ // 754 elements
+	// Entry 0 - 1F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 20 - 3F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 40 - 5F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 60 - 7F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 80 - 9F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry A0 - BF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry C0 - DF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry E0 - FF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 100 - 11F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 120 - 13F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 140 - 15F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 160 - 17F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 180 - 19F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 1A0 - 1BF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 1C0 - 1DF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 1E0 - 1FF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 200 - 21F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 220 - 23F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 240 - 25F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 260 - 27F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 280 - 29F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 2A0 - 2BF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 2C0 - 2DF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 2E0 - 2FF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000,
+} // Size: xxxx bytes
+
+var indices = []uint16{ // 83 elements
+	// Entry 0 - 3F
+	0x0001, 0x0002, 0x0003, 0x0006, 0x0020, 0x0026, 0x0002, 0x0009,
+	0x001d, 0x0001, 0x000b, 0x0003, 0x8002, 0x8002, 0x000f, 0x000c,
+	0x0000, 0x0000, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e,
+	0x0023, 0x0028, 0x002d, 0x0032, 0x0037, 0x0001, 0x0000, 0x003c,
+	0x0002, 0x9000, 0x0023, 0x0001, 0x0000, 0x013b, 0x0002, 0x0029,
+	0x0050, 0x0002, 0x002c, 0x003e, 0x0003, 0x8002, 0x9001, 0x0030,
+	0x000c, 0x0000, 0x023a, 0x023f, 0x0244, 0x0249, 0x024e, 0x0253,
+	0x0258, 0x025d, 0x0262, 0x0267, 0x026c, 0x0271, 0x0003, 0x9000,
+	// Entry 40 - 7F
+	0x0042, 0x9000, 0x000c, 0x0000, 0x0276, 0x0278, 0x027a, 0x027c,
+	0x027e, 0x0280, 0x0282, 0x0284, 0x0286, 0x0288, 0x028b, 0x028e,
+	0x0001, 0x0000, 0x0291,
+} // Size: xxxx bytes
+
+var buckets = []string{
+	bucket0,
+}
+
+var bucket0 string = "" + // Size: xxxx bytes
+	"\x04cM01\x04cM02\x04cM03\x04cM04\x04cM05\x04cM06\x04cM07\x04cM08\x04cM09" +
+	"\x04cM10\x04cM11\x04cM12\xfe\x01\x94\xfd\xc2\xfa/\xfc\xc0A\xd3\xff\x12" +
+	"\x04[s\xc8nO\xf9_\xf6b\xa5\xee\xe8*\xbd\xf4J-\x0bu\xfb\x18\x0d\xafH\xa7" +
+	"\x9e\xe0\xb1\x0d9FQ\x85\x0fԡx\x89.\xe2\x85\xec\xe1Q\x14Ux\x08u\xd6N\xe2" +
+	"\xd3\xd0\xd0\xdek\xf8\xf9\xb4L\xe8_\xf0DƱ\xf8;\x8e\x88;\xbf\x85z\xab\x99" +
+	"ŲR\xc7B\x9c2\U000e8bb7\x9e\xf8V\xf6Y\xc1\x8f\x0d\xce\xccw\xc7^z\x81\xbf" +
+	"\xde'_g\xcf\xe2B\xcf<\xc3T\xf3\xed\xe2־\xccN\xa3\xae^\x88Rj\x9fJW\x8b˞" +
+	"\xf2ԦS\x14v\x8dm)\x97a\xea\x9eOZ\xa6\xae\xc3\xfcxƪ\xe0\x81\xac\x81 \xc7 " +
+	"\xef\xcdlꄶ\x92^`{\xe0cqo\x96\xdd\xcd\xd0\x1du\x04\\?\x00\x0f\x8ayk\xcelQ" +
+	",8\x01\xaa\xca\xee߭[Pfd\xe8\xc0\xe4\xa7q\xecื\xc1\x96]\x91\x81%\x1b|\x9c" +
+	"\x9c\xa5 Z\xfc\x16\xa26\xa2\xef\xcd\xd2\xd1-*y\xd0\xfet\xa8(\x0a\xe9C" +
+	"\x9e\xb0֮\xca\x08#\xae\x02\xd6}\x86j\xc2\xc4\xfeJrPS\xda\x11\x9b\x9dOQQ@" +
+	"\xa2\xd7#\x9c@\xb4ZÕ\x0d\x94\x1f\xc4\xfe\x1c\x0c\xb9j\xd3\x22\xd6\x22" +
+	"\x82)_\xbf\xe1\x1e&\xa43\x07m\xb5\xc1DL:4\xd3*\\J\x7f\xfb\xe8с\xf7\xed;" +
+	"\x8c\xfe\x90O\x93\xf8\xf0m)\xbc\xd9\xed\x84{\x18.\x04d\x10\xf4Kİ\xf3\xf0" +
+	":\x0d\x06\x82\x0a0\xf2W\xf8\x11A0g\x8a\xc0E\x86\xc1\xe3\xc94,\x8b\x80U" +
+	"\xc4f؆D\x1d%\x99\x06͉֚K\x96\x8a\xe9\xf0띖\\\xe6\xa4i<N\xbe\x88\x15\x01" +
+	"\xb7لkf\xeb\x02\xb5~\\\xda{l\xbah\x91\xd6\x16\xbdhl7\xb84a:Ⱥ\xa2,\x00" +
+	"\x8f\xfeh\x83RsJ\xe4\xe3\xf1!z\xcd_\x83'\x08\x140\x18g\xb5\xd0g\x11\xb28" +
+	"\x00\x1cyW\xb2w\x19\xce?1\x88\xdf\xe5}\xee\xbfo\x82YZ\x10\xf7\xbbV,\xa0M" +
+	"\\='\x04gM01\x04gM02\x04gM03\x04gM04\x04gM05\x04gM06\x04gM07\x04gM08\x04" +
+	"gM09\x04gM10\x04gM11\x04gM12\x011\x012\x013\x014\x015\x016\x017\x018\x01" +
+	"9\x0210\x0211\x0212\xfe\x94)X\xc6\xdb2bg\x06I\xf3\xbc\x97٢1g5\xed悥\xdf" +
+	"\xe6\xf1\xa0\x11\xfbɊ\xd0\xfb\xe7\x90\x00<\x01\xe8\xe9\x96w\x03\xaff^" +
+	"\x9fr@\x7fK\x03\xd4\xfd\xb4t\xaa\xfe\x8a\x0d>\x05\x15\xddFP\xcfQ\x17+" +
+	"\x81$\x8b\xcb\x7f\x96\x9e@\x0bl[\x12wh\xb1\xc4\x12\xfa\xe9\x8c\xf5v1\xcf" +
+	"7\x03;KJ\xba}~\xd3\x19\xba\x14rI\xc9\x08\xacp\xd1\xc4\x06\xda\xde\x0e" +
+	"\x82\x8e\xb6\xba\x0dʨ\x82\x85T>\x10!<d?\xc8`;X`#fp\xba\xbc\xad\x0b\xd7" +
+	"\xf4\xc4\x19\x0e26#\xa8h\xd1\xea\xe1v\x9f@\xa2f1C\x1b;\xd5!V\x05\xd2\x08" +
+	"o\xeaԙ\xacc\xa4e=\x12(=V\x01\x9c7\x95\xa9\x8a\x12m\x09\xcf\xcb\xe3l\xdc" +
+	"\xc97\x88\xa5@\x9f\x8bnB\xc2݃\xaaFa\x18R\xad\x0bP(w\\w\x16\x90\xb6\x85N" +
+	"\x05\xb3w$\x1es\xa8\x83\xddw\xaf\xf00,m\xa8f\\B4\x1d\xdaJ\xda\xea"
+
+	// Total table size: xxxx bytes (4KiB); checksum: DB2842B6
diff --git a/internal/cldrtree/testdata/test2/common/main/en.xml b/internal/cldrtree/testdata/test2/common/main/en.xml
new file mode 100644
index 0000000..ae7f148
--- /dev/null
+++ b/internal/cldrtree/testdata/test2/common/main/en.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ldml>
+	<identity>
+		<language type="en"/>
+	</identity>
+	<dates>
+		<calendars>
+			<calendar type="buddhist">
+				<eras>
+					<eraAbbr>
+						<era type="0">BE</era>
+					</eraAbbr>
+				</eras>
+			</calendar>
+			<calendar type="chinese">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<month type="1">Mo1</month>
+							<month type="2">Mo2</month>
+							<month type="3">Mo3</month>
+							<month type="4">Mo4</month>
+							<month type="5">Mo5</month>
+							<month type="6">Mo6</month>
+							<month type="7">Mo7</month>
+							<month type="8">Mo8</month>
+							<month type="9">Mo9</month>
+							<month type="10">Mo10</month>
+							<month type="11">Mo11</month>
+							<month type="12">Mo12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">First Month</month>
+							<month type="2">Second Month</month>
+							<month type="3">Third Month</month>
+							<month type="4">Fourth Month</month>
+							<month type="5">Fifth Month</month>
+							<month type="6">Sixth Month</month>
+							<month type="7">Seventh Month</month>
+							<month type="8">Eighth Month</month>
+							<month type="9">Ninth Month</month>
+							<month type="10">Tenth Month</month>
+							<month type="11">Eleventh Month</month>
+							<month type="12">Twelfth Month</month>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<cyclicNameSets>
+					<cyclicNameSet type="zodiacs">
+						<cyclicNameContext type="format">
+							<cyclicNameWidth type="abbreviated">
+								<cyclicName type="1">Rat</cyclicName>
+								<cyclicName type="2">Ox</cyclicName>
+								<cyclicName type="3">Tiger</cyclicName>
+								<cyclicName type="4">Rabbit</cyclicName>
+								<cyclicName type="5">Dragon</cyclicName>
+								<cyclicName type="6">Snake</cyclicName>
+								<cyclicName type="7">Horse</cyclicName>
+								<cyclicName type="8">Goat</cyclicName>
+								<cyclicName type="9">Monkey</cyclicName>
+								<cyclicName type="10">Rooster</cyclicName>
+								<cyclicName type="11">Dog</cyclicName>
+								<cyclicName type="12">Pig</cyclicName>
+							</cyclicNameWidth>
+						</cyclicNameContext>
+					</cyclicNameSet>
+				</cyclicNameSets>
+			</calendar>
+			<calendar type="generic">
+			</calendar>
+			<calendar type="gregorian">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="wide">
+							<month type="1">enWideM1</month>
+							<month type="2">enWideM2</month>
+							<month type="3">enWideM3</month>
+							<month type="4">enWideM4</month>
+							<month type="5">enWideM5</month>
+							<month type="6">enWideM6</month>
+							<month type="7">enWideM7</month>
+							<month type="8">enWideM8</month>
+							<month type="9">enWideM9</month>
+							<month type="10">enWideM10</month>
+							<month type="11">enWideM11</month>
+							<month type="12">enWideM12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="narrow">
+							<month type="1">enNarrowM1</month>
+							<month type="2">enNarrowM2</month>
+							<month type="3">enNarrowM3</month>
+							<month type="4">enNarrowM4</month>
+							<month type="5">enNarrowM5</month>
+							<month type="6">enNarrowM6</month>
+							<!-- missing -->
+							<month type="8">enNarrowM8</month>
+							<month type="9">enNarrowM9</month>
+							<month type="10">enNarrowM10</month>
+							<month type="11">enNarrowM11</month>
+							<month type="12">enNarrowM12</month>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<era type="0">Before Christ</era>
+						<era type="0" alt="variant">Before Common Era</era>
+						<era type="1">Anno Domini</era>
+						<era type="1" alt="variant">Common Era</era>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">BC</era>
+						<era type="0" alt="variant">BCE</era>
+						<era type="1">AD</era>
+						<era type="1" alt="variant">CE</era>
+					</eraAbbr>
+					<!-- nothing for eraNarrow -->
+				</eras>
+			</calendar>
+			<calendar type="hebrew">
+				<eras>
+					<eraAbbr>
+						<era type="0">AM</era>
+					</eraAbbr>
+				</eras>
+			</calendar>
+			<calendar type="islamic">
+				<eras>
+					<eraAbbr>
+						<era type="0">AH</era>
+					</eraAbbr>
+				</eras>
+			</calendar>
+		</calendars>
+		<fields>
+			<field type="era">
+				<displayName>era</displayName>
+			</field>
+			<field type="month">
+				<displayName>month</displayName>
+				<relative type="-1">last month</relative>
+				<relative type="0">this month</relative>
+				<relative type="1">next month</relative>
+				<relativeTime type="future">
+					<relativeTimePattern count="one">enFutMOne</relativeTimePattern>
+					<relativeTimePattern count="other">enFutMOther</relativeTimePattern>
+				</relativeTime>
+				<relativeTime type="past">
+					<relativeTimePattern count="one">enPastMOne</relativeTimePattern>
+					<relativeTimePattern count="other">enPastMOther</relativeTimePattern>
+				</relativeTime>
+			</field>
+			<field type="month-short">
+				<displayName>mo.</displayName>
+				<relative type="-1">last mo.</relative>
+				<relative type="0">this mo.</relative>
+				<relative type="1">next mo.</relative>
+				<relativeTime type="future">
+					<relativeTimePattern count="one">enShortFutMOne</relativeTimePattern>
+					<relativeTimePattern count="other">enShortFutMOther</relativeTimePattern>
+				</relativeTime>
+				<relativeTime type="past">
+					<relativeTimePattern count="one">enShortPastMOne</relativeTimePattern>
+					<relativeTimePattern count="other">enShortPastMOther</relativeTimePattern>
+				</relativeTime>
+			</field>
+		</fields>
+	</dates>
+</ldml>
diff --git a/internal/cldrtree/testdata/test2/common/main/en_001.xml b/internal/cldrtree/testdata/test2/common/main/en_001.xml
new file mode 100644
index 0000000..e585448
--- /dev/null
+++ b/internal/cldrtree/testdata/test2/common/main/en_001.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ldml>
+	<identity>
+		<language type="en"/>
+		<territory type="001"/>
+	</identity>
+	<dates>
+		<calendars>
+			<calendar type="chinese">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<month type="1">001AbbrMo1</month>
+							<month type="2">001AbbrMo2</month>
+							<month type="3">001AbbrMo3</month>
+							<month type="4">001AbbrMo4</month>
+							<month type="5">001AbbrMo5</month>
+							<month type="6">001AbbrMo6</month>
+							<month type="7">001AbbrMo7</month>
+							<month type="8">001AbbrMo8</month>
+							<month type="9">001AbbrMo9</month>
+							<month type="10">001AbbrMo10</month>
+							<month type="11">001AbbrMo11</month>
+							<month type="12">001AbbrMo12</month>
+						</monthWidth>
+					</monthContext>
+				</months>
+			</calendar>
+			<calendar type="generic">
+			</calendar>
+			<calendar type="gregorian">
+			</calendar>
+		</calendars>
+		<fields>
+			<field type="month-short">
+				<displayName>mo</displayName>
+				<relativeTime type="future">
+					<relativeTimePattern count="one">001ShortFutMOne</relativeTimePattern>
+					<relativeTimePattern count="other">001ShortFutMOther</relativeTimePattern>
+				</relativeTime>
+				<relativeTime type="past">
+					<!-- missing -->
+					<relativeTimePattern count="other">001ShortPastMOther</relativeTimePattern>
+				</relativeTime>
+			</field>
+			<field type="month-narrow">
+				<displayName>mo</displayName>
+				<relativeTime type="future">
+					<relativeTimePattern count="one">001NarrowFutMOne</relativeTimePattern>
+					<relativeTimePattern count="two">001NarrowFutMTwo</relativeTimePattern>
+					<relativeTimePattern count="other">001NarrowFutMOther</relativeTimePattern>
+				</relativeTime>
+				<relativeTime type="past">
+					<relativeTimePattern count="one">001NarrowPastMOne</relativeTimePattern>
+					<relativeTimePattern count="other">001NarrowPastMOther</relativeTimePattern>
+				</relativeTime>
+			</field>
+		</fields>
+	</dates>
+</ldml>
diff --git a/internal/cldrtree/testdata/test2/common/main/en_GB.xml b/internal/cldrtree/testdata/test2/common/main/en_GB.xml
new file mode 100644
index 0000000..948ad73
--- /dev/null
+++ b/internal/cldrtree/testdata/test2/common/main/en_GB.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ldml>
+	<identity>
+		<language type="en"/>
+		<territory type="GB"/>
+	</identity>
+	<dates>
+		<calendars>
+			<calendar type="gregorian">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<month type="1">gbAbbrM1</month>
+							<month type="2">gbAbbrM2</month>
+							<month type="3">gbAbbrM3</month>
+							<month type="4">gbAbbrM4</month>
+							<month type="5">gbAbbrM5</month>
+							<month type="6">gbAbbrM6</month>
+							<month type="7">gbAbbrM7</month>
+							<month type="8">gbAbbrM8</month>
+							<month type="9">gbAbbrM9</month>
+							<month type="10">gbAbbrM10</month>
+							<month type="11">gbAbbrM11</month>
+							<month type="12">gbAbbrM12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">gbWideM1</month>
+							<month type="2">gbWideM2</month>
+							<month type="3">gbWideM3</month>
+							<month type="4">gbWideM4</month>
+							<month type="5">gbWideM5</month>
+							<month type="6">gbWideM6</month>
+							<month type="7">gbWideM7</month>
+							<month type="8">gbWideM8</month>
+							<month type="9">gbWideM9</month>
+							<month type="10">gbWideM10</month>
+							<month type="11">gbWideM11</month>
+							<month type="12">gbWideM12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="narrow">
+							<month type="1">gbNarrowM1</month>
+							<month type="2">gbNarrowM2</month>
+							<month type="3">gbNarrowM3</month>
+							<!-- missing -->
+							<month type="5">gbNarrowM5</month>
+							<month type="6">gbNarrowM6</month>
+							<!-- missing -->
+							<month type="8">gbNarrowM8</month>
+							<month type="9">gbNarrowM9</month>
+							<month type="10">gbNarrowM10</month>
+							<month type="11">gbNarrowM11</month>
+							<month type="12">gbNarrowM12</month>
+						</monthWidth>
+					</monthContext>
+				</months>
+			</calendar>
+			<calendar type="islamic">
+			</calendar>
+		</calendars>
+	</dates>
+</ldml>
diff --git a/internal/cldrtree/testdata/test2/common/main/root.xml b/internal/cldrtree/testdata/test2/common/main/root.xml
new file mode 100644
index 0000000..7f80720
--- /dev/null
+++ b/internal/cldrtree/testdata/test2/common/main/root.xml
@@ -0,0 +1,646 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ldml>
+	<identity>
+		<language type="root"/>
+	</identity>
+	<dates>
+		<calendars>
+			<calendar type="buddhist">
+				<months>
+					<alias source="locale" path="../../calendar[@type='generic']/months"/> <!-- gregorian in original -->
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">BE</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="chinese">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">chineseWideM01</month>
+							<month type="2">chineseWideM02</month>
+							<month type="3">chineseWideM03</month>
+							<month type="4">chineseWideM04</month>
+							<month type="5">chineseWideM05</month>
+							<month type="6">chineseWideM06</month>
+							<month type="7">chineseWideM07</month>
+							<month type="8">chineseWideM08</month>
+							<month type="9">chineseWideM09</month>
+							<month type="10">chineseWideM10</month>
+							<month type="11">chineseWideM11</month>
+							<month type="12">chineseWideM12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">chineseNarrowM1</month>
+							<month type="2">chineseNarrowM2</month>
+							<month type="3">chineseNarrowM3</month>
+							<month type="4">chineseNarrowM4</month>
+							<month type="5">chineseNarrowM5</month>
+							<month type="6">chineseNarrowM6</month>
+							<month type="7">chineseNarrowM7</month>
+							<month type="8">chineseNarrowM8</month>
+							<month type="9">chineseNarrowM9</month>
+							<month type="10">chineseNarrowM10</month>
+							<month type="11">chineseNarrowM11</month>
+							<month type="12">chineseNarrowM12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<!-- chinese eras are computed, and don't fall back to gregorian -->
+				<cyclicNameSets>
+					<cyclicNameSet type="dayParts">
+						<cyclicNameContext type="format">
+							<cyclicNameWidth type="abbreviated">
+								<cyclicName type="1">dpAbbr1</cyclicName>
+								<cyclicName type="2">dpAbbr2</cyclicName>
+								<cyclicName type="3">dpAbbr3</cyclicName>
+								<cyclicName type="4">dpAbbr4</cyclicName>
+								<cyclicName type="5">dpAbbr5</cyclicName>
+								<cyclicName type="6">dpAbbr6</cyclicName>
+								<cyclicName type="7">dpAbbr7</cyclicName>
+								<cyclicName type="8">dpAbbr8</cyclicName>
+								<cyclicName type="9">dpAbbr9</cyclicName>
+								<cyclicName type="10">dpAbbr10</cyclicName>
+								<cyclicName type="11">dpAbbr11</cyclicName>
+								<cyclicName type="12">dpAbbr12</cyclicName>
+							</cyclicNameWidth>
+							<cyclicNameWidth type="narrow">
+								<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+							<cyclicNameWidth type="wide">
+								<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+						</cyclicNameContext>
+					</cyclicNameSet>
+					<cyclicNameSet type="days">
+						<alias source="locale" path="../cyclicNameSet[@type='years']"/>
+					</cyclicNameSet>
+					<cyclicNameSet type="months">
+						<alias source="locale" path="../cyclicNameSet[@type='years']"/>
+					</cyclicNameSet>
+					<cyclicNameSet type="years">
+						<cyclicNameContext type="format">
+							<cyclicNameWidth type="abbreviated">
+								<cyclicName type="1">year1</cyclicName>
+								<cyclicName type="2">year2</cyclicName>
+								<cyclicName type="3">year3</cyclicName>
+								<cyclicName type="4">year4</cyclicName>
+								<cyclicName type="5">year5</cyclicName>
+								<cyclicName type="6">year6</cyclicName>
+								<cyclicName type="7">year7</cyclicName>
+								<cyclicName type="8">year8</cyclicName>
+								<cyclicName type="9">year9</cyclicName>
+								<cyclicName type="10">year10</cyclicName>
+								<cyclicName type="11">year11</cyclicName>
+								<cyclicName type="12">year12</cyclicName>
+								<cyclicName type="13">year13</cyclicName>
+								<cyclicName type="14">year14</cyclicName>
+								<cyclicName type="15">year15</cyclicName>
+								<cyclicName type="16">year16</cyclicName>
+								<cyclicName type="17">year17</cyclicName>
+								<cyclicName type="18">year18</cyclicName>
+								<cyclicName type="19">year19</cyclicName>
+								<cyclicName type="20">year20</cyclicName>
+								<cyclicName type="21">year21</cyclicName>
+								<cyclicName type="22">year22</cyclicName>
+								<cyclicName type="23">year23</cyclicName>
+								<cyclicName type="24">year24</cyclicName>
+								<cyclicName type="25">year25</cyclicName>
+								<cyclicName type="26">year26</cyclicName>
+								<cyclicName type="27">year27</cyclicName>
+								<cyclicName type="28">year28</cyclicName>
+								<cyclicName type="29">year29</cyclicName>
+								<cyclicName type="30">year30</cyclicName>
+								<cyclicName type="31">year31</cyclicName>
+								<cyclicName type="32">year32</cyclicName>
+								<cyclicName type="33">year33</cyclicName>
+								<cyclicName type="34">year34</cyclicName>
+								<cyclicName type="35">year35</cyclicName>
+								<cyclicName type="36">year36</cyclicName>
+								<cyclicName type="37">year37</cyclicName>
+								<cyclicName type="38">year38</cyclicName>
+								<cyclicName type="39">year39</cyclicName>
+								<cyclicName type="40">year40</cyclicName>
+								<cyclicName type="41">year41</cyclicName>
+								<cyclicName type="42">year42</cyclicName>
+								<cyclicName type="43">year43</cyclicName>
+								<cyclicName type="44">year44</cyclicName>
+								<cyclicName type="45">year45</cyclicName>
+								<cyclicName type="46">year46</cyclicName>
+								<cyclicName type="47">year47</cyclicName>
+								<cyclicName type="48">year48</cyclicName>
+								<cyclicName type="49">year49</cyclicName>
+								<cyclicName type="50">year50</cyclicName>
+								<cyclicName type="51">year51</cyclicName>
+								<cyclicName type="52">year52</cyclicName>
+								<cyclicName type="53">year53</cyclicName>
+								<cyclicName type="54">year54</cyclicName>
+								<cyclicName type="55">year55</cyclicName>
+								<cyclicName type="56">year56</cyclicName>
+								<cyclicName type="57">year57</cyclicName>
+								<cyclicName type="58">year58</cyclicName>
+								<cyclicName type="59">year59</cyclicName>
+								<cyclicName type="60">year60</cyclicName>
+							</cyclicNameWidth>
+							<cyclicNameWidth type="narrow">
+								<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+							<cyclicNameWidth type="wide">
+								<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+						</cyclicNameContext>
+					</cyclicNameSet>
+					<cyclicNameSet type="zodiacs">
+						<cyclicNameContext type="format">
+							<cyclicNameWidth type="abbreviated">
+								<alias source="locale" path="../../../cyclicNameSet[@type='dayParts']/cyclicNameContext[@type='format']/cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+							<cyclicNameWidth type="narrow">
+								<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+							<cyclicNameWidth type="wide">
+								<alias source="locale" path="../cyclicNameWidth[@type='abbreviated']"/>
+							</cyclicNameWidth>
+						</cyclicNameContext>
+					</cyclicNameSet>
+				</cyclicNameSets>
+			</calendar>
+			<calendar type="dangi">
+				<months>
+					<alias source="locale" path="../../calendar[@type='chinese']/months"/>
+				</months>
+				<cyclicNameSets>
+					<alias source="locale" path="../../calendar[@type='chinese']/cyclicNameSets"/>
+				</cyclicNameSets>
+			</calendar>
+			<calendar type="ethiopic">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">Meskerem</month>
+							<month type="2">Tekemt</month>
+							<month type="3">Hedar</month>
+							<month type="4">Tahsas</month>
+							<month type="5">Ter</month>
+							<month type="6">Yekatit</month>
+							<month type="7">Megabit</month>
+							<month type="8">Miazia</month>
+							<month type="9">Genbot</month>
+							<month type="10">Sene</month>
+							<month type="11">Hamle</month>
+							<month type="12">Nehasse</month>
+							<month type="13">Pagumen</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">1</month>
+							<month type="2">2</month>
+							<month type="3">3</month>
+							<month type="4">4</month>
+							<month type="5">5</month>
+							<month type="6">6</month>
+							<month type="7">7</month>
+							<month type="8">8</month>
+							<month type="9">9</month>
+							<month type="10">10</month>
+							<month type="11">11</month>
+							<month type="12">12</month>
+							<month type="13">13</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">ERA0</era>
+						<era type="1">ERA1</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="ethiopic-amete-alem">
+				<months>
+					<alias source="locale" path="../../calendar[@type='ethiopic']/months"/>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">ERA0</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="generic">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">genWideM01</month>
+							<month type="2">genWideM02</month>
+							<month type="3">genWideM03</month>
+							<month type="4">genWideM04</month>
+							<month type="5">genWideM05</month>
+							<month type="6">genWideM06</month>
+							<month type="7">genWideM07</month>
+							<month type="8">genWideM08</month>
+							<month type="9">genWideM09</month>
+							<month type="10">genWideM10</month>
+							<month type="11">genWideM11</month>
+							<month type="12">genWideM12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">genNarrowM1</month>
+							<month type="2">genNarrowM2</month>
+							<month type="3">genNarrowM3</month>
+							<month type="4">genNarrowM4</month>
+							<month type="5">genNarrowM5</month>
+							<month type="6">genNarrowM6</month>
+							<month type="7">genNarrowM7</month>
+							<month type="8">genNarrowM8</month>
+							<month type="9">genNarrowM9</month>
+							<month type="10">genNarrowM10</month>
+							<month type="11">genNarrowM11</month>
+							<month type="12">genNarrowM12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">ERA0</era>
+						<era type="1">ERA1</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="gregorian">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">gregWideM01</month>
+							<month type="2">gregWideM02</month>
+							<month type="3">gregWideM03</month>
+							<month type="4">gregWideM04</month>
+							<month type="5">gregWideM05</month>
+							<month type="6">gregWideM06</month>
+							<month type="7">gregWideM07</month>
+							<month type="8">gregWideM08</month>
+							<month type="9">gregWideM09</month>
+							<month type="10">gregWideM10</month>
+							<month type="11">gregWideM11</month>
+							<month type="12">gregWideM12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">gregNarrowM1</month>
+							<month type="2">gregNarrowM2</month>
+							<month type="3">gregNarrowM3</month>
+							<month type="4">gregNarrowM4</month>
+							<month type="5">gregNarrowM5</month>
+							<month type="6">gregNarrowM6</month>
+							<month type="7">gregNarrowM7</month>
+							<month type="8">gregNarrowM8</month>
+							<month type="9">gregNarrowM9</month>
+							<month type="10">gregNarrowM10</month>
+							<month type="11">gregNarrowM11</month>
+							<month type="12">gregNarrowM12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">BCE</era>
+						<era type="1">CE</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="hebrew">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">Tishri</month>
+							<month type="2">Heshvan</month>
+							<month type="3">Kislev</month>
+							<month type="4">Tevet</month>
+							<month type="5">Shevat</month>
+							<month type="6">Adar I</month>
+							<month type="7">Adar</month>
+							<month type="7" yeartype="leap">Adar II</month>
+							<month type="8">Nisan</month>
+							<month type="9">Iyar</month>
+							<month type="10">Sivan</month>
+							<month type="11">Tamuz</month>
+							<month type="12">Av</month>
+							<month type="13">Elul</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">1</month>
+							<month type="2">2</month>
+							<month type="3">3</month>
+							<month type="4">4</month>
+							<month type="5">5</month>
+							<month type="6">6</month>
+							<month type="7">7</month>
+							<month type="7" yeartype="leap">7</month>
+							<month type="8">8</month>
+							<month type="9">9</month>
+							<month type="10">10</month>
+							<month type="11">11</month>
+							<month type="12">12</month>
+							<month type="13">13</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">AM</era>
+						<!-- HY = Anno Mundi = -180799862400000 milliseconds since 1/1/1970 AD -->
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="islamic">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<month type="1">islAbbr1</month>
+							<month type="2">islAbbr2</month>
+							<month type="3">islAbbr3</month>
+							<month type="4">islAbbr4</month>
+							<month type="5">islAbbr5</month>
+							<month type="6">islAbbr6</month>
+							<month type="7">islAbbr7</month>
+							<month type="8">islAbbr8</month>
+							<month type="9">islAbbr9</month>
+							<month type="10">islAbbr10</month>
+							<month type="11">islAbbr11</month>
+							<month type="12">islAbbr12</month>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">islWide1</month>
+							<month type="2">islWide2</month>
+							<month type="3">islWide3</month>
+							<month type="4">islWide4</month>
+							<month type="5">islWide5</month>
+							<month type="6">islWide6</month>
+							<month type="7">islWide7</month>
+							<month type="8">islWide8</month>
+							<month type="9">islWide9</month>
+							<month type="10">islWide10</month>
+							<month type="11">islWide11</month>
+							<month type="12">islWide12</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">1</month>
+							<month type="2">2</month>
+							<month type="3">3</month>
+							<month type="4">4</month>
+							<month type="5">5</month>
+							<month type="6">6</month>
+							<month type="7">7</month>
+							<month type="8">8</month>
+							<month type="9">9</month>
+							<month type="10">10</month>
+							<month type="11">11</month>
+							<month type="12">12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">AH</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+			<calendar type="islamic-civil">
+				<months>
+					<alias source="locale" path="../../calendar[@type='islamic']/months"/>
+				</months>
+				<eras>
+					<alias source="locale" path="../../calendar[@type='islamic']/eras"/>
+				</eras>
+			</calendar>
+			<calendar type="islamic-rgsa">
+				<months>
+					<alias source="locale" path="../../calendar[@type='islamic']/months"/>
+				</months>
+				<eras>
+					<alias source="locale" path="../../calendar[@type='islamic']/eras"/>
+				</eras>
+			</calendar>
+			<calendar type="islamic-tbla">
+				<months>
+					<alias source="locale" path="../../calendar[@type='islamic']/months"/>
+				</months>
+			</calendar>
+			<calendar type="islamic-umalqura">
+				<months>
+					<alias source="locale" path="../../calendar[@type='islamic']/months"/>
+				</months>
+			</calendar>
+			<calendar type="persian">
+				<months>
+					<monthContext type="format">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../monthWidth[@type='wide']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
+						</monthWidth>
+						<monthWidth type="wide">
+							<month type="1">Farvardin</month>
+							<month type="2">Ordibehesht</month>
+							<month type="3">Khordad</month>
+							<month type="4">Tir</month>
+							<month type="5">Mordad</month>
+							<month type="6">Shahrivar</month>
+							<month type="7">Mehr</month>
+							<month type="8">Aban</month>
+							<month type="9">Azar</month>
+							<month type="10">Dey</month>
+							<month type="11">Bahman</month>
+							<month type="12">Esfand</month>
+						</monthWidth>
+					</monthContext>
+					<monthContext type="stand-alone">
+						<monthWidth type="abbreviated">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='abbreviated']"/>
+						</monthWidth>
+						<monthWidth type="narrow">
+							<month type="1">1</month>
+							<month type="2">2</month>
+							<month type="3">3</month>
+							<month type="4">4</month>
+							<month type="5">5</month>
+							<month type="6">6</month>
+							<month type="7">7</month>
+							<month type="8">8</month>
+							<month type="9">9</month>
+							<month type="10">10</month>
+							<month type="11">11</month>
+							<month type="12">12</month>
+						</monthWidth>
+						<monthWidth type="wide">
+							<alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
+						</monthWidth>
+					</monthContext>
+				</months>
+				<eras>
+					<eraNames>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNames>
+					<eraAbbr>
+						<era type="0">AP</era>
+					</eraAbbr>
+					<eraNarrow>
+						<alias source="locale" path="../eraAbbr"/>
+					</eraNarrow>
+				</eras>
+			</calendar>
+		</calendars>
+		<fields>
+			<field type="era">
+				<displayName>Era</displayName>
+			</field>
+			<field type="era-short">
+				<alias source="locale" path="../field[@type='era']"/>
+			</field>
+			<field type="era-narrow">
+				<alias source="locale" path="../field[@type='era-short']"/>
+			</field>
+			<field type="month">
+				<displayName>Month</displayName>
+				<relative type="-1">last month</relative>
+				<relative type="0">this month</relative>
+				<relative type="1">next month</relative>
+				<relativeTime type="future">
+					<relativeTimePattern count="other">+{0} m</relativeTimePattern>
+				</relativeTime>
+				<relativeTime type="past">
+					<relativeTimePattern count="other">-{0} m</relativeTimePattern>
+				</relativeTime>
+			</field>
+			<field type="month-short">
+				<alias source="locale" path="../field[@type='month']"/>
+			</field>
+			<field type="month-narrow">
+				<alias source="locale" path="../field[@type='month-short']"/>
+			</field>
+		</fields>
+	</dates>
+</ldml>
diff --git a/internal/cldrtree/testdata/test2/output.go b/internal/cldrtree/testdata/test2/output.go
new file mode 100755
index 0000000..469d065
--- /dev/null
+++ b/internal/cldrtree/testdata/test2/output.go
@@ -0,0 +1,786 @@
+// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
+
+package test
+
+import "golang.org/x/text/internal/cldrtree"
+
+var tree = &cldrtree.Tree{locales, indices, buckets}
+
+// Path values:
+// <era>
+//   - eraAbbr
+//   - eraNarrow
+//   - eraNames
+// <context>
+//   - format
+//   - stand-alone
+// <width>
+//   - abbreviated
+//   - narrow
+//   - wide
+//
+// - calendars
+//   - buddhist
+//   - chinese
+//   - dangi
+//   - ethiopic
+//   - ethiopic-amete-alem
+//   - generic
+//   - gregorian
+//   - hebrew
+//   - islamic
+//   - islamic-civil
+//   - islamic-rgsa
+//   - islamic-tbla
+//   - islamic-umalqura
+//   - persian
+//     - months
+//       - <context>
+//         - <width>
+//           - 1..13
+//           - 7leap
+//     - eras
+//       - <era>
+//         - ""
+//         - variant
+//           - 0..1
+//     - filler
+//       - 0
+//     - cyclicNameSets
+//       - dayParts
+//       - days
+//       - months
+//       - years
+//       - zodiacs
+//         - <context>
+//           - <width>
+//             - 1..60
+// - fields
+//   - era
+//   - era-short
+//   - era-narrow
+//   - month
+//   - month-short
+//   - month-narrow
+//     - displayName
+//       - ""
+//     - relative
+//       - -1
+//       - 0..1
+//     - relativeTime
+//       - future
+//       - past
+//         - other
+//         - one
+//         - two
+//
+// Nr elem:            394
+// uniqued size:       9778
+// total string size:  9931
+// bucket waste:       0
+
+// era specifies a property of a CLDR field.
+type era int
+
+const (
+	eraAbbr era = iota
+	eraNarrow
+	eraNames
+)
+
+// context specifies a property of a CLDR field.
+type context int
+
+const (
+	format context = iota
+	standAlone
+)
+
+// width specifies a property of a CLDR field.
+type width int
+
+const (
+	abbreviated width = iota
+	narrow
+	wide
+)
+
+var locales = []uint32{ // 754 elements
+	// Entry 0 - 1F
+	0x00000000, 0x00000000, 0x0000026b, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 20 - 3F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 40 - 5F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 60 - 7F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 80 - 9F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x0000026b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000026b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000026b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	// Entry A0 - BF
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x000003c8, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000026b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000026b, 0x0000036b, 0x0000026b, 0x0000036b,
+	// Entry C0 - DF
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000026b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	// Entry E0 - FF
+	0x0000036b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000026b, 0x0000026b, 0x0000036b, 0x0000036b,
+	0x0000026b, 0x0000036b, 0x0000036b, 0x0000036b,
+	0x0000036b, 0x0000036b, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 100 - 11F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 120 - 13F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 140 - 15F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 160 - 17F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 180 - 19F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 1A0 - 1BF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 1C0 - 1DF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 1E0 - 1FF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 200 - 21F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 220 - 23F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 240 - 25F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 260 - 27F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 280 - 29F
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 2A0 - 2BF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 2C0 - 2DF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	// Entry 2E0 - 2FF
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000, 0x00000000, 0x00000000,
+	0x00000000, 0x00000000,
+} // Size: xxxx bytes
+
+var indices = []uint16{ // 1046 elements
+	// Entry 0 - 3F
+	0x0002, 0x0003, 0x024a, 0x000e, 0x0012, 0x0022, 0x00b5, 0x00bd,
+	0x00f7, 0x0107, 0x013f, 0x0177, 0x01b2, 0x01f7, 0x01fe, 0x0205,
+	0x020c, 0x0213, 0x0003, 0x9005, 0x0016, 0x001f, 0x0003, 0x001a,
+	0x8000, 0x8000, 0x0001, 0x001c, 0x0001, 0x0000, 0x0000, 0x0001,
+	0x0000, 0x0003, 0x0004, 0x0027, 0x0000, 0x00b2, 0x004e, 0x0002,
+	0x002a, 0x003c, 0x0003, 0x8002, 0x9001, 0x002e, 0x000c, 0x0000,
+	0x0102, 0x0111, 0x0120, 0x012f, 0x013e, 0x014d, 0x015c, 0x016b,
+	0x017a, 0x0189, 0x0198, 0x01a7, 0x0003, 0x9000, 0x0040, 0x9000,
+	// Entry 40 - 7F
+	0x000c, 0x0000, 0x01b6, 0x01c6, 0x01d6, 0x01e6, 0x01f6, 0x0206,
+	0x0216, 0x0226, 0x0236, 0x0246, 0x0257, 0x0268, 0x0005, 0x0054,
+	0x8003, 0x8003, 0x0068, 0x00ac, 0x0001, 0x0056, 0x0003, 0x005a,
+	0x8000, 0x8000, 0x000c, 0x0000, 0x0279, 0x0281, 0x0289, 0x0291,
+	0x0299, 0x02a1, 0x02a9, 0x02b1, 0x02b9, 0x02c1, 0x02ca, 0x02d3,
+	0x0001, 0x006a, 0x0003, 0x006e, 0x8000, 0x8000, 0x003c, 0x0000,
+	0x02dc, 0x02e2, 0x02e8, 0x02ee, 0x02f4, 0x02fa, 0x0300, 0x0306,
+	0x030c, 0x0312, 0x0319, 0x0320, 0x0327, 0x032e, 0x0335, 0x033c,
+	// Entry 80 - BF
+	0x0343, 0x034a, 0x0351, 0x0358, 0x035f, 0x0366, 0x036d, 0x0374,
+	0x037b, 0x0382, 0x0389, 0x0390, 0x0397, 0x039e, 0x03a5, 0x03ac,
+	0x03b3, 0x03ba, 0x03c1, 0x03c8, 0x03cf, 0x03d6, 0x03dd, 0x03e4,
+	0x03eb, 0x03f2, 0x03f9, 0x0400, 0x0407, 0x040e, 0x0415, 0x041c,
+	0x0423, 0x042a, 0x0431, 0x0438, 0x043f, 0x0446, 0x044d, 0x0454,
+	0x045b, 0x0462, 0x0469, 0x0470, 0x0001, 0x00ae, 0x0003, 0xa000,
+	0x8000, 0x8000, 0x0001, 0x0000, 0x0477, 0x0004, 0x9001, 0x0000,
+	0x00ba, 0x9001, 0x0001, 0x0000, 0x0576, 0x0003, 0x00c1, 0x00ea,
+	// Entry C0 - FF
+	0x00f4, 0x0002, 0x00c4, 0x00d7, 0x0003, 0x8002, 0x9001, 0x00c8,
+	0x000d, 0x0000, 0x0675, 0x067e, 0x0685, 0x068b, 0x0692, 0x0696,
+	0x069e, 0x06a6, 0x06ad, 0x06b4, 0x06b9, 0x06bf, 0x06c7, 0x0003,
+	0x9000, 0x00db, 0x9000, 0x000d, 0x0000, 0x06cf, 0x06d1, 0x06d3,
+	0x06d5, 0x06d7, 0x06d9, 0x06db, 0x06dd, 0x06df, 0x06e1, 0x06e4,
+	0x06e7, 0x06ea, 0x0003, 0x00ee, 0x8000, 0x8000, 0x0001, 0x00f0,
+	0x0002, 0x0000, 0x06ed, 0x06f2, 0x0001, 0x0000, 0x06f7, 0x0003,
+	0x9003, 0x00fb, 0x0104, 0x0003, 0x00ff, 0x8000, 0x8000, 0x0001,
+	// Entry 100 - 13F
+	0x0101, 0x0001, 0x0000, 0x06ed, 0x0001, 0x0000, 0x07f6, 0x0003,
+	0x010b, 0x0132, 0x013c, 0x0002, 0x010e, 0x0120, 0x0003, 0x8002,
+	0x9001, 0x0112, 0x000c, 0x0000, 0x08f5, 0x0900, 0x090b, 0x0916,
+	0x0921, 0x092c, 0x0937, 0x0942, 0x094d, 0x0958, 0x0963, 0x096e,
+	0x0003, 0x9000, 0x0124, 0x9000, 0x000c, 0x0000, 0x0979, 0x0985,
+	0x0991, 0x099d, 0x09a9, 0x09b5, 0x09c1, 0x09cd, 0x09d9, 0x09e5,
+	0x09f2, 0x09ff, 0x0003, 0x0136, 0x8000, 0x8000, 0x0001, 0x0138,
+	0x0002, 0x0000, 0x06ed, 0x06f2, 0x0001, 0x0000, 0x0a0c, 0x0003,
+	// Entry 140 - 17F
+	0x0143, 0x016a, 0x0174, 0x0002, 0x0146, 0x0158, 0x0003, 0x8002,
+	0x9001, 0x014a, 0x000c, 0x0000, 0x0b0b, 0x0b17, 0x0b23, 0x0b2f,
+	0x0b3b, 0x0b47, 0x0b53, 0x0b5f, 0x0b6b, 0x0b77, 0x0b83, 0x0b8f,
+	0x0003, 0x9000, 0x015c, 0x9000, 0x000c, 0x0000, 0x0b9b, 0x0ba8,
+	0x0bb5, 0x0bc2, 0x0bcf, 0x0bdc, 0x0be9, 0x0bf6, 0x0c03, 0x0c10,
+	0x0c1e, 0x0c2c, 0x0003, 0x016e, 0x8000, 0x8000, 0x0001, 0x0170,
+	0x0002, 0x0000, 0x0c3a, 0x0c3e, 0x0001, 0x0000, 0x0c41, 0x0003,
+	0x017b, 0x01a6, 0x01af, 0x0002, 0x017e, 0x0192, 0x0003, 0x8002,
+	// Entry 180 - 1BF
+	0x9001, 0x0182, 0x000e, 0x0000, 0x0d40, 0x0d47, 0x0d4f, 0x0d56,
+	0x0d5c, 0x0d63, 0x0d6a, 0x0d77, 0x0d7d, 0x0d82, 0x0d88, 0x0d8e,
+	0x0d91, 0x0d6f, 0x0003, 0x9000, 0x0196, 0x9000, 0x000e, 0x0000,
+	0x06cf, 0x06d1, 0x06d3, 0x06d5, 0x06d7, 0x06d9, 0x06db, 0x06dd,
+	0x06df, 0x06e1, 0x06e4, 0x06e7, 0x06ea, 0x06db, 0x0003, 0x01aa,
+	0x8000, 0x8000, 0x0001, 0x01ac, 0x0001, 0x0000, 0x0d96, 0x0001,
+	0x0000, 0x0d99, 0x0003, 0x01b6, 0x01eb, 0x01f4, 0x0002, 0x01b9,
+	0x01d9, 0x0003, 0x01bd, 0x9001, 0x01cb, 0x000c, 0x0000, 0x0e98,
+	// Entry 1C0 - 1FF
+	0x0ea1, 0x0eaa, 0x0eb3, 0x0ebc, 0x0ec5, 0x0ece, 0x0ed7, 0x0ee0,
+	0x0ee9, 0x0ef3, 0x0efd, 0x000c, 0x0000, 0x0f07, 0x0f10, 0x0f19,
+	0x0f22, 0x0f2b, 0x0f34, 0x0f3d, 0x0f46, 0x0f4f, 0x0f58, 0x0f62,
+	0x0f6c, 0x0003, 0x9000, 0x01dd, 0x9000, 0x000c, 0x0000, 0x06cf,
+	0x06d1, 0x06d3, 0x06d5, 0x06d7, 0x06d9, 0x06db, 0x06dd, 0x06df,
+	0x06e1, 0x06e4, 0x06e7, 0x0003, 0x01ef, 0x8000, 0x8000, 0x0001,
+	0x01f1, 0x0001, 0x0000, 0x0f76, 0x0001, 0x0000, 0x0f79, 0x0003,
+	0x9008, 0x9008, 0x01fb, 0x0001, 0x0000, 0x1078, 0x0003, 0x9008,
+	// Entry 200 - 23F
+	0x9008, 0x0202, 0x0001, 0x0000, 0x1177, 0x0003, 0x9008, 0x0000,
+	0x0209, 0x0001, 0x0000, 0x1276, 0x0003, 0x9008, 0x0000, 0x0210,
+	0x0001, 0x0000, 0x1375, 0x0003, 0x0217, 0x023e, 0x0247, 0x0002,
+	0x021a, 0x022c, 0x0003, 0x8002, 0x9001, 0x021e, 0x000c, 0x0000,
+	0x1474, 0x147e, 0x148a, 0x1492, 0x1496, 0x149d, 0x14a7, 0x14ac,
+	0x14b1, 0x14b6, 0x14ba, 0x14c1, 0x0003, 0x9000, 0x0230, 0x9000,
+	0x000c, 0x0000, 0x06cf, 0x06d1, 0x06d3, 0x06d5, 0x06d7, 0x06d9,
+	0x06db, 0x06dd, 0x06df, 0x06e1, 0x06e4, 0x06e7, 0x0003, 0x0242,
+	// Entry 240 - 27F
+	0x8000, 0x8000, 0x0001, 0x0244, 0x0001, 0x0000, 0x14c8, 0x0001,
+	0x0000, 0x14cb, 0x0006, 0x0251, 0x8000, 0x8001, 0x0256, 0x8003,
+	0x8004, 0x0001, 0x0253, 0x0001, 0x0000, 0x15ca, 0x0003, 0x025a,
+	0x025d, 0x0262, 0x0001, 0x0000, 0x15ce, 0x0003, 0x0000, 0x15d4,
+	0x15df, 0x15ea, 0x0002, 0x0265, 0x0268, 0x0001, 0x0000, 0x15f5,
+	0x0001, 0x0000, 0x15fc, 0x0002, 0x0003, 0x00c7, 0x0009, 0x000d,
+	0x001b, 0x0000, 0x0000, 0x0000, 0x005d, 0x0064, 0x00ab, 0x00b9,
+	0x0003, 0x0000, 0x0011, 0x0018, 0x0001, 0x0013, 0x0001, 0x0015,
+	// Entry 280 - 2BF
+	0x0001, 0x0000, 0x0000, 0x0001, 0x0000, 0x1603, 0x0004, 0x0020,
+	0x0000, 0x005a, 0x0042, 0x0001, 0x0022, 0x0003, 0x0026, 0x0000,
+	0x0034, 0x000c, 0x0000, 0x1702, 0x1706, 0x170a, 0x170e, 0x1712,
+	0x1716, 0x171a, 0x171e, 0x1722, 0x1726, 0x172b, 0x1730, 0x000c,
+	0x0000, 0x1735, 0x1741, 0x174e, 0x175a, 0x1767, 0x1773, 0x177f,
+	0x178d, 0x179a, 0x17a6, 0x17b2, 0x17c1, 0x0005, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0048, 0x0001, 0x004a, 0x0001, 0x004c, 0x000c,
+	0x0000, 0x17cf, 0x17d3, 0x17d6, 0x17dc, 0x17e3, 0x17ea, 0x17f0,
+	// Entry 2C0 - 2FF
+	0x17f6, 0x17fb, 0x1802, 0x180a, 0x180e, 0x0001, 0x0000, 0x1812,
+	0x0003, 0x0000, 0x0000, 0x0061, 0x0001, 0x0000, 0x1911, 0x0003,
+	0x0068, 0x008e, 0x00a8, 0x0002, 0x006b, 0x007d, 0x0003, 0x0000,
+	0x0000, 0x006f, 0x000c, 0x0000, 0x1a10, 0x1a19, 0x1a22, 0x1a2b,
+	0x1a34, 0x1a3d, 0x1a46, 0x1a4f, 0x1a58, 0x1a61, 0x1a6b, 0x1a75,
+	0x0002, 0x0000, 0x0080, 0x000c, 0x0000, 0x1a7f, 0x1a8a, 0x1a95,
+	0x1aa0, 0x1aab, 0x1ab6, 0xffff, 0x1ac1, 0x1acc, 0x1ad7, 0x1ae3,
+	0x1aef, 0x0003, 0x009d, 0x0000, 0x0092, 0x0002, 0x0095, 0x0099,
+	// Entry 300 - 33F
+	0x0002, 0x0000, 0x1afb, 0x1b1b, 0x0002, 0x0000, 0x1b09, 0x1b27,
+	0x0002, 0x00a0, 0x00a4, 0x0002, 0x0000, 0x1b32, 0x1b35, 0x0002,
+	0x0000, 0x0c3a, 0x0c3e, 0x0001, 0x0000, 0x1b38, 0x0003, 0x0000,
+	0x00af, 0x00b6, 0x0001, 0x00b1, 0x0001, 0x00b3, 0x0001, 0x0000,
+	0x0d96, 0x0001, 0x0000, 0x1c37, 0x0003, 0x0000, 0x00bd, 0x00c4,
+	0x0001, 0x00bf, 0x0001, 0x00c1, 0x0001, 0x0000, 0x0f76, 0x0001,
+	0x0000, 0x1d36, 0x0005, 0x00cd, 0x0000, 0x0000, 0x00d2, 0x00e9,
+	0x0001, 0x00cf, 0x0001, 0x0000, 0x1e35, 0x0003, 0x00d6, 0x00d9,
+	// Entry 340 - 37F
+	0x00de, 0x0001, 0x0000, 0x1e39, 0x0003, 0x0000, 0x15d4, 0x15df,
+	0x15ea, 0x0002, 0x00e1, 0x00e5, 0x0002, 0x0000, 0x1e49, 0x1e3f,
+	0x0002, 0x0000, 0x1e60, 0x1e55, 0x0003, 0x00ed, 0x00f0, 0x00f5,
+	0x0001, 0x0000, 0x1e6d, 0x0003, 0x0000, 0x1e71, 0x1e7a, 0x1e83,
+	0x0002, 0x00f8, 0x00fc, 0x0002, 0x0000, 0x1e9b, 0x1e8c, 0x0002,
+	0x0000, 0x1ebc, 0x1eac, 0x0002, 0x0003, 0x0032, 0x0007, 0x0000,
+	0x000b, 0x0000, 0x0000, 0x0000, 0x0024, 0x002b, 0x0003, 0x000f,
+	0x0000, 0x0021, 0x0001, 0x0011, 0x0001, 0x0013, 0x000c, 0x0000,
+	// Entry 380 - 3BF
+	0x1ece, 0x1ed9, 0x1ee4, 0x1eef, 0x1efa, 0x1f05, 0x1f10, 0x1f1b,
+	0x1f26, 0x1f31, 0x1f3d, 0x1f49, 0x0001, 0x0001, 0x0000, 0x0003,
+	0x0000, 0x0000, 0x0028, 0x0001, 0x0001, 0x00ff, 0x0003, 0x0000,
+	0x0000, 0x002f, 0x0001, 0x0001, 0x01fe, 0x0006, 0x0000, 0x0000,
+	0x0000, 0x0000, 0x0039, 0x004a, 0x0003, 0x003d, 0x0000, 0x0040,
+	0x0001, 0x0001, 0x02fd, 0x0002, 0x0043, 0x0047, 0x0002, 0x0001,
+	0x0310, 0x0300, 0x0001, 0x0001, 0x0322, 0x0003, 0x004e, 0x0000,
+	0x0051, 0x0001, 0x0001, 0x02fd, 0x0002, 0x0054, 0x0059, 0x0003,
+	// Entry 3C0 - 3FF
+	0x0001, 0x0357, 0x0335, 0x0346, 0x0002, 0x0001, 0x037c, 0x036a,
+	0x0001, 0x0002, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x000c, 0x0000, 0x0047, 0x0003, 0x0010, 0x0000, 0x0044,
+	0x0002, 0x0013, 0x0033, 0x0003, 0x0017, 0x0000, 0x0025, 0x000c,
+	0x0001, 0x0390, 0x0399, 0x03a2, 0x03ab, 0x03b4, 0x03bd, 0x03c6,
+	0x03cf, 0x03d8, 0x03e1, 0x03eb, 0x03f5, 0x000c, 0x0001, 0x03ff,
+	0x0408, 0x0411, 0x041a, 0x0423, 0x042c, 0x0435, 0x043e, 0x0447,
+	0x0450, 0x045a, 0x0464, 0x0002, 0x0000, 0x0036, 0x000c, 0x0001,
+	// Entry 400 - 43F
+	0x046e, 0x0479, 0x0484, 0xffff, 0x048f, 0x049a, 0xffff, 0x04a5,
+	0x04b0, 0x04bb, 0x04c7, 0x04d3, 0x0001, 0x0001, 0x04df, 0x0003,
+	0x0000, 0x0000, 0x004b, 0x0001, 0x0001, 0x05de,
+} // Size: xxxx bytes
+
+var buckets = []string{
+	bucket0,
+	bucket1,
+}
+
+var bucket0 string = "" + // Size: xxxx bytes
+	"\x02BE\xfe\x01\x94\xfd\xc2\xfa/\xfc\xc0A\xd3\xff\x12\x04[s\xc8nO\xf9_" +
+	"\xf6b\xa5\xee\xe8*\xbd\xf4J-\x0bu\xfb\x18\x0d\xafH\xa7\x9e\xe0\xb1\x0d9F" +
+	"Q\x85\x0fԡx\x89.\xe2\x85\xec\xe1Q\x14Ux\x08u\xd6N\xe2\xd3\xd0\xd0\xdek" +
+	"\xf8\xf9\xb4L\xe8_\xf0DƱ\xf8;\x8e\x88;\xbf\x85z\xab\x99ŲR\xc7B\x9c2" +
+	"\U000e8bb7\x9e\xf8V\xf6Y\xc1\x8f\x0d\xce\xccw\xc7^z\x81\xbf\xde'_g\xcf" +
+	"\xe2B\xcf<\xc3T\xf3\xed\xe2־\xccN\xa3\xae^\x88Rj\x9fJW\x8b˞\xf2ԦS\x14v" +
+	"\x8dm)\x97a\xea\x9eOZ\xa6\xae\xc3\xfcxƪ\xe0\x81\xac\x81 \xc7 \xef\xcdlꄶ" +
+	"\x92^`{\xe0cqo\x96\xdd\xcd\xd0\x1du\x04\\?\x00\x0f\x8ayk\xcelQ,8\x01\xaa" +
+	"\xca\xee߭[Pfd\xe8\xc0\xe4\xa7q\xecื\xc1\x96]\x91\x81%\x1b|\x9c\x9c\xa5 Z" +
+	"\xfc\x16\xa26\xa2\xef\xcd\xd2\xd1-*y\xd0\x0echineseWideM01\x0echineseWid" +
+	"eM02\x0echineseWideM03\x0echineseWideM04\x0echineseWideM05\x0echineseWid" +
+	"eM06\x0echineseWideM07\x0echineseWideM08\x0echineseWideM09\x0echineseWid" +
+	"eM10\x0echineseWideM11\x0echineseWideM12\x0fchineseNarrowM1\x0fchineseNa" +
+	"rrowM2\x0fchineseNarrowM3\x0fchineseNarrowM4\x0fchineseNarrowM5\x0fchine" +
+	"seNarrowM6\x0fchineseNarrowM7\x0fchineseNarrowM8\x0fchineseNarrowM9\x10c" +
+	"hineseNarrowM10\x10chineseNarrowM11\x10chineseNarrowM12\x07dpAbbr1\x07dp" +
+	"Abbr2\x07dpAbbr3\x07dpAbbr4\x07dpAbbr5\x07dpAbbr6\x07dpAbbr7\x07dpAbbr8" +
+	"\x07dpAbbr9\x08dpAbbr10\x08dpAbbr11\x08dpAbbr12\x05year1\x05year2\x05yea" +
+	"r3\x05year4\x05year5\x05year6\x05year7\x05year8\x05year9\x06year10\x06ye" +
+	"ar11\x06year12\x06year13\x06year14\x06year15\x06year16\x06year17\x06year" +
+	"18\x06year19\x06year20\x06year21\x06year22\x06year23\x06year24\x06year25" +
+	"\x06year26\x06year27\x06year28\x06year29\x06year30\x06year31\x06year32" +
+	"\x06year33\x06year34\x06year35\x06year36\x06year37\x06year38\x06year39" +
+	"\x06year40\x06year41\x06year42\x06year43\x06year44\x06year45\x06year46" +
+	"\x06year47\x06year48\x06year49\x06year50\x06year51\x06year52\x06year53" +
+	"\x06year54\x06year55\x06year56\x06year57\x06year58\x06year59\x06year60" +
+	"\xfet\xa8(\x0a\xe9C\x9e\xb0֮\xca\x08#\xae\x02\xd6}\x86j\xc2\xc4\xfeJrPS" +
+	"\xda\x11\x9b\x9dOQQ@\xa2\xd7#\x9c@\xb4ZÕ\x0d\x94\x1f\xc4\xfe\x1c\x0c\xb9" +
+	"j\xd3\x22\xd6\x22\x82)_\xbf\xe1\x1e&\xa43\x07m\xb5\xc1DL:4\xd3*\\J\x7f" +
+	"\xfb\xe8с\xf7\xed;\x8c\xfe\x90O\x93\xf8\xf0m)\xbc\xd9\xed\x84{\x18.\x04d" +
+	"\x10\xf4Kİ\xf3\xf0:\x0d\x06\x82\x0a0\xf2W\xf8\x11A0g\x8a\xc0E\x86\xc1" +
+	"\xe3\xc94,\x8b\x80U\xc4f؆D\x1d%\x99\x06͉֚K\x96\x8a\xe9\xf0띖\\\xe6\xa4i<N" +
+	"\xbe\x88\x15\x01\xb7لkf\xeb\x02\xb5~\\\xda{l\xbah\x91\xd6\x16\xbdhl7\xb8" +
+	"4a:Ⱥ\xa2,\x00\x8f\xfeh\x83RsJ\xe4\xe3\xf1!z\xcd_\x83'\x08\x140\x18g\xb5" +
+	"\xd0g\x11\xb28\x00\x1cyW\xb2w\x19\xce?1\x88\xdf\xe5}\xee\xbfo\x82YZ\x10" +
+	"\xf7\xbbV,\xa0M\\='\xfe\x94)X\xc6\xdb2bg\x06I\xf3\xbc\x97٢1g5\xed悥\xdf" +
+	"\xe6\xf1\xa0\x11\xfbɊ\xd0\xfb\xe7\x90\x00<\x01\xe8\xe9\x96w\x03\xaff^" +
+	"\x9fr@\x7fK\x03\xd4\xfd\xb4t\xaa\xfe\x8a\x0d>\x05\x15\xddFP\xcfQ\x17+" +
+	"\x81$\x8b\xcb\x7f\x96\x9e@\x0bl[\x12wh\xb1\xc4\x12\xfa\xe9\x8c\xf5v1\xcf" +
+	"7\x03;KJ\xba}~\xd3\x19\xba\x14rI\xc9\x08\xacp\xd1\xc4\x06\xda\xde\x0e" +
+	"\x82\x8e\xb6\xba\x0dʨ\x82\x85T>\x10!<d?\xc8`;X`#fp\xba\xbc\xad\x0b\xd7" +
+	"\xf4\xc4\x19\x0e26#\xa8h\xd1\xea\xe1v\x9f@\xa2f1C\x1b;\xd5!V\x05\xd2\x08" +
+	"o\xeaԙ\xacc\xa4e=\x12(=V\x01\x9c7\x95\xa9\x8a\x12m\x09\xcf\xcb\xe3l\xdc" +
+	"\xc97\x88\xa5@\x9f\x8bnB\xc2݃\xaaFa\x18R\xad\x0bP(w\\w\x16\x90\xb6\x85N" +
+	"\x05\xb3w$\x1es\xa8\x83\xddw\xaf\xf00,m\xa8f\\B4\x1d\xdaJ\xda\xea\x08Mes" +
+	"kerem\x06Tekemt\x05Hedar\x06Tahsas\x03Ter\x07Yekatit\x07Megabit\x06Miazi" +
+	"a\x06Genbot\x04Sene\x05Hamle\x07Nehasse\x07Pagumen\x011\x012\x013\x014" +
+	"\x015\x016\x017\x018\x019\x0210\x0211\x0212\x0213\x04ERA0\x04ERA1\xfeYZ" +
+	"\xb1\x89_\x96RH\x9d\xd2δ\x9c$t0<\xbbD¹C\x03\xdbf,\x9cf\xb8x)\x05\x19\x0f" +
+	"\x1e\x165\xb6>4\x87\x8d?$o\xad\xfc\xe3D\xe7N\xf8\x13\x09\x0f\x800\xbc" +
+	"\xd5%\xac\x10e?\xf1\x82\xe0\x01 \xf7\xe1\xf7\x96\xfa\x0f\xc1k\xa7\xbb" +
+	"\x90\xbe*3\xe8|=`\xabb\x84q\xa4 \x83C\x83f\x18\x01\xbb\x0b\xfd\x8el\x14" +
+	"\x00q\xdb\x1e\xb2\xf7\xa1\x81\x94\xf1\xa0E\xa9L\x07\x885\xc7]\xff/>\x83a" +
+	"\x80\xba\xad\x9e\x95]\xa8@\xdct\xc4\xdc$\x98\xf8\xc2\x01\xae\xc2T\xa0" +
+	"\xe3dv\xb2\xee\xb1$\xfdƯ\xc1\xb7\xd8\x09\xc5\xe0\x8b^\x0e\x84Z\xaf\x9bl9" +
+	"W\xe9Z\xb4\xaa\x8e\x10|ۇ?-\xacR\x7f\x16\xc4լ\x87`v\x8aq^Fi˄\x0c%1\x7f" +
+	"\x9a6\x87t\xe5\x064\x1a\xfbFP>(\xe9.Q\xbd\x7f}KS\xb9\x02=V\xf9\xb9\xec" +
+	"\x99\x1a©ټE\xffd\xbb+\xf1M@Q\xa7`K\xfe(\xba\xd4M\x98\xbf\xe3\x0eT\xeb" +
+	"\xc0\x7f\xa4_b\xaa\xbe9\\\xc9O\xa0\xa0\xf2F\xb5ҋ.?m\xeb)\x90\x18pX\xe4" +
+	"\xbf\xd2\xd1d\x06S\xfc8\xa3\x0b\x0f\x83#\x1a\x96[A;\x0f&\x92~\x0d\x03." +
+	"\x83\x0bs+\u07b3\x09L\xb1\xa5\xfam\xec\x9f\x067^\xa2_\xe5|(S\xea\x092" +
+	"\x0aȀ9v\xeaʠ\x95\xc0/\x86\x9f\xd7\xdc1\x07$u\x94\x0c7Q\xd5b\x83Ğ/\xef" +
+	"\xd4\x1d\xf6v\xbd\xcbXU\xa0G\x0e\xfd-\xabzr\xcc^_9\xff~\xea\x0fC:\x9f綦u" +
+	"\xbc*\xc5\x0c\xd2\x18\xc0\x09\xe2\x1f\x91\x0f\x9d\xdb\x09\xa0\xd0Y\xc4" +
+	"\xcd},\xa6Z#I\xdfz\x86}\xbe݁\xe9ԉ\x16\x19\xc8<B\x89\\\xe1\xb6q\xcbzK\xca" +
+	"\xed\x910\xab\x1d\xd4\xcc-\x81G\xa1YPV\xb5_\x92\xa3U\xdbvZ܍=\xf8\x8e\xb9" +
+	"=R\x7f\x7f~\xc8i\xa7W\x03\xba\x86Գa\x10\xe9\xa0DY<\x96h\x15\xd1S\x0agenW" +
+	"ideM01\x0agenWideM02\x0agenWideM03\x0agenWideM04\x0agenWideM05\x0agenWid" +
+	"eM06\x0agenWideM07\x0agenWideM08\x0agenWideM09\x0agenWideM10\x0agenWideM" +
+	"11\x0agenWideM12\x0bgenNarrowM1\x0bgenNarrowM2\x0bgenNarrowM3\x0bgenNarr" +
+	"owM4\x0bgenNarrowM5\x0bgenNarrowM6\x0bgenNarrowM7\x0bgenNarrowM8\x0bgenN" +
+	"arrowM9\x0cgenNarrowM10\x0cgenNarrowM11\x0cgenNarrowM12\xfefS\x87\xdc8" +
+	"\xe5\x07\xe7E\x8d\xf3\xe6\xb0\xf0@5\xef\x94\x19\x88>\x03\xc0\x8e-u;\x08" +
+	"\xc9\x09\x0a\xab\xf1u\xfd\xb6>\x8c\xf9\xa5\xf0x7\x04\xc7A\xc1\x95\x15v&@" +
+	"\x1d\x94\x9e\xaam\xbd\x04\u05ed\xe5t\x9e\xabTp\xbf^\x9c\x18\xccyݤ\xe1." +
+	"\xfeVNˊ@\x19\xe1\xc4\x1f-\x82\x17\xc0ä7\x12\xae\x22o\xcewf1\xae\x19\xb3&" +
+	"\xa4\x11\xa2\x84t\x1b\xe0\x1f\xb4\xf3\xae\xfc]\uf58e\xb6\xcc\xeb\x86\x04" +
+	"\x86KK\x9a\xd3sˬ\x10\xea~f[)J\x8ay\x06\x91\xaaRF\xe6\xff\x8fз\xfb\x9b" +
+	"\x9aj\x95\x8e\xbf(\xec^\x8f\xaacJu*\xc9q\xc0\xbc\x0ccp\x04\xce\xe2b\xce" +
+	"\xf1.|\xf6\xd9\xcdwrQ=\xbdFav\xa0z\xb7\xc4\xf4e\xfe\x09twy\xc3\x14\x95扶_" +
+	"U{\x0aJ\xf6SX\x80\xb8%S\xd1&\xffr\x13T)\x05Zdt\x95\x993>\x96U\xb4:\xa3g(" +
+	"\xbbc\xbd(d'D\x0bgregWideM01\x0bgregWideM02\x0bgregWideM03\x0bgregWideM0" +
+	"4\x0bgregWideM05\x0bgregWideM06\x0bgregWideM07\x0bgregWideM08\x0bgregWid" +
+	"eM09\x0bgregWideM10\x0bgregWideM11\x0bgregWideM12\x0cgregNarrowM1\x0cgre" +
+	"gNarrowM2\x0cgregNarrowM3\x0cgregNarrowM4\x0cgregNarrowM5\x0cgregNarrowM" +
+	"6\x0cgregNarrowM7\x0cgregNarrowM8\x0cgregNarrowM9\x0dgregNarrowM10\x0dgr" +
+	"egNarrowM11\x0dgregNarrowM12\x03BCE\x02CE\xfe\x1b\xaa\x9f0]\\%\xe0R)\xbb" +
+	"3/~\x83u\xb7\xc4^\x1e\xa0F\x1d3<<r_tg\xb4A\xb7\xd0\xf5\xe8\x02B\xb7\xa4" +
+	"\xa1\x8e\xda\xe8z\xf2b\xa1\x0d3\xfc\x0d}\x9a\x0aF4\xf0{\xea\\Z\x00!/\xbc" +
+	"Y\x1b\xdd\xfe\xbb\x943OJ-\x92\x86s\xd2b\xad\xab\xaa\x82\x98;\x94\x96_U˒" +
+	"\x8ch?GB\xc1 \x99\xb72\xbd\x03c\x9c\x19yu-\x83u\x18$;t\xd6s\x01$^\xfeVa" +
+	"\xea\xa0B\x89\x17\xf5ZX\xcc3\xdb(M\x1f,\xaa\x05\xf1\xfd{f\x02\x98\x0f" +
+	"\x06\xd1\x07#\x0b\xf3\x10\xb4\x8c\xf6)B\x01}\xd6h\x0e\xb3\xab\x131\x0e" +
+	"\xca\x15\x81\xaf\xb3Ŷ\x19\xe5\xce\x06\x82\xd0\xdf\xc1\xfa\xde9(\x17\x9a" +
+	"\x9d\u008c\xd1p\xb5\xb5TN\x7f\x9bc\xb8=\xa3t\xaf\xa2\x8e\x14x\xdc\\)\x97" +
+	"\xa9\x83G\xec\x1eqQN\xb2h\x22\x16-\xc7Ù/\xd4\x1f\x0b,\xcc&\xe5^{\xd8\xf3" +
+	"\xfa7!_wKR\x16\xb5\x06Tishri\x07Heshvan\x06Kislev\x05Tevet\x06Shevat\x06" +
+	"Adar I\x04Adar\x07Adar II\x05Nisan\x04Iyar\x05Sivan\x05Tamuz\x02Av\x04El" +
+	"ul\x02AM\xfe\xb8r\xb6\xc28\x8d\xd9P\x16\x0e?\xfa;\xf0b<C\x86U\xbb\\\x8cv" +
+	"\x8a\xb3:\xe2\xee9!\x86t\x00\x86e\xe2\x0a:\xcd\xf8J\xbe\xf3\\\xab\xccH" +
+	"\x91X\xc0\x85?տ\xa9T\x22a9\xfcD\xc4\xf5\x06nQ\xdbr\xb73\xe9\xff\xb1|\xbf" +
+	"\x9eeIl\x07\u05c9g7͐x\x1c\xb7re\x02\xc8Ar\xcaYh\xffɽ\xd0H\x0e|\xe6\xe2_}" +
+	"\x0b\x80\xbe\x87B\x93\x18\xc8P8g\x9b\xa0e\xbc\x9f\xdf\xfa\xe3\xfa\x84" +
+	"\x86\xfc\xef݂\xce\x09\xaf\x9e\xa5\xa6H\x87\xe0k\xa7g@=\x0bx\x8a\xb0\xae" +
+	"\x9e#\xc1\xf7\x89\x1f\x8c\x00\x07\x0dN\xf5Ak\xf1\u0558\xac^\xb59\xf1\x13" +
+	"\x97\xf0g\xeb\xd1\xe4\x91\xd5\xfc\xf6\x1a\xb5\xee*\xb8/\xb7w\xadS\x8c" +
+	"\xfc\x11|<Pҳ\xf9\x14=Uw\x0c\x85s7\x8f+\xa3C\x84\xcc\x13\xdc\x1c+<\x93" +
+	"\xa3K\xbbp\xdbh)\xf2ŋ\xed\x1c|\xf8\xf7\xa2\xbaA\x0apЭI\x06\x03U\xb9\xde" +
+	"\x08islAbbr1\x08islAbbr2\x08islAbbr3\x08islAbbr4\x08islAbbr5\x08islAbbr6" +
+	"\x08islAbbr7\x08islAbbr8\x08islAbbr9\x09islAbbr10\x09islAbbr11\x09islAbb" +
+	"r12\x08islWide1\x08islWide2\x08islWide3\x08islWide4\x08islWide5\x08islWi" +
+	"de6\x08islWide7\x08islWide8\x08islWide9\x09islWide10\x09islWide11\x09isl" +
+	"Wide12\x02AH\xfe\xb9p\x124V\x03\xd9\xd0\xd1ܰޟ\xcc\xd2 \x13kc\xa31b\x06" +
+	"\xe6\x889\x80+\xa7\xc3\x0c\xa3\xf8\xddj[\x8fú\x16\x0e\x91\x83\x80W\xa8ZG" +
+	"\x09S0\xf8\x82\xe6M\xbb\x12\x80\x0cS\xefm\xbe.\x85,\xe6\x0b\xbb\x09\xc4." +
+	"\\X\xa9\xf6,Y\x04\xd6_\xbc\xb0\xa3X\xd6\xe12\xe7}ٷ\xb9\x89>\x86Nm\xac" +
+	"\x1a\xac\xb8\x87\xbd\x03\x01裑:\xact%\xd2٦\xf6\xee+T\x93\xac\xb09\xac(E" +
+	"\xeb\x0e\xfa.\xdd\x0a<\xf9k\xa9z\xd7\x1d\xae\x00U`\xab\xa2\xa2\x00z\x0f" +
+	"\xa0Hc\xcbiF\x9f\x94\xa3n\x89\x1e9\xad\xcb̛^4\xca(\x13\xd1\xd7CZ\xc8\xfc" +
+	"\xacv\xa8\x96T<}\xcdn\xd0F\x01\x1f3\x0b\xcc\xe8H\x0d4&\x8eg$\x02q\xe3M" +
+	"\xd9\x13\xd5\xfd\xe1d\xa1\xe0\x14\xc9\x17ދ\xd4q\xb8\xe7\x0bww\x0b\x05h" +
+	"\x022k8?n:\x11^\xc9\\\xb3\x01\xc7y2\x1d9\x1a\x140\xdaR\x8d,\xfe\xf0;po" +
+	"\x9d\x12T\x96\x90\x9b\xa8\xeex\x04\xc1\x98L,C\xb6\x89\xb53\xddƇVZ\xf5i" +
+	"\xfcg7\x9e\xac\xb2F9\xeczw*\x17N Y\x8fg\xbc\xb5\xebfn\xef\xcd\xe0ʇ'\xad" +
+	"\xfa\xb2WB\x8a\x8f2\xa8˄l\xff\xe5:-\xe15\xb4\xfe/\x0di^+\xc6\xe7\x07\xc0" +
+	"\xafi\x17\x88\x10\xcay\xf4.x@!LxF\x06\xab\x9b_!\xf3N\x9d\xae\x83Z?\xa8" +
+	"\x01\xf0{錒'>\xc6D\x7fW\xe7\x89\x18r_/X\xfd\x9d\x04\x07\x14L\xce*^}kz\xae" +
+	"\x1b\x9cPg\x89\x0e\x05toS\xf5g\xd4VlA\xdb\xc1:\x092\x88\xf5\xd0\xe6\x00" +
+	"\x1dp\x90m\x80x\x9ek:\xf6e\xa9\x12\xb8\xfb\xbfx\xf6\x86\x1dm\xb48g\x97#" +
+	"\xf3\xf1\xc5s\x1e\xfeh\xce\x19Cӽ\x8b\xe3\x08\xac\xd4D0\xf6}\xfbj\xfd\xf5" +
+	"\x22{\x8f\xf1\x0d\x87\xcf~\xeb\x0e\xbc\x03\x1d\xf9\x1c\xbcE\xad\xc6gz" +
+	"\x971\x11+j\xe9\x85\xe0\xfe\xc5FУ\x8d\xe1=~p\x9e1(\x89\x89\xc7l\xbd\x90" +
+	"\xd2h\xb35\xf0\xd2A\xf7o@KT}\xc4^=`\xe4\xa1\\\x00nNK\x86&j`\x95)\x88\xf6" +
+	"\xb1O\xde\x11\x92\x9e\xe5\x9b S\xcfV\x04\xdf\x09hf4\xf26\xac\x14\x16&d" +
+	"\x0b\xe0\x9dL\xf9\xa7\xb6\xc90'\x95j\xef\xef[b\x9e̺u\x97\xb2o\xe2\x8e" +
+	"\xc0\xae\xa3\xf42\xd5&\x02:\xb1b\x89\x00\xd6Y\xe0IE\x16F\xba\xfb\xbcm" +
+	"\x14s\x84\x91\x08\xf9\xa3\xd4:\x8b\x0f\xb7&_o\x0d\xd4X\x7fX\x90\x1b\xb4" +
+	"\xa3^<\\\xc8X\x1f\xb8+\x1b\xa1J\xaf\x11\xaaL8C\xb3l\xa9\x13\xa7\xb8h7" +
+	"\x97\xed\xa5\xb6\x90\x14~o\xe5}o\x8f\x05\xbd%.\xc2\xe1\xcf(\x1dO\x89u" +
+	"\xdc\xff!\xaf\xe4\x11\x99\x97yj\x88?\xb1\x1eY\xe40\\I8\x22h\xe8\xbda\xe4" +
+	"\x19\xf2m\x15nޕ\x98>d\xf3y*X&\xa2\xfe:r\x15\x22\xa4\xb16\x0dyw\x09\x98" +
+	"\x9d,\xfe\x93\x98 {\xb1u\xf0\x1e\x8b\xea2\xa8\xfc\xe3\xc1\xf0b\x9f\xe6" +
+	"\x08\xf9\xe8\xf1OÒ\x18r\x0cK\xb1\x88\x82\xa4܈\x95\x0b\x99a\x89\xa9&\xfb" +
+	"\xd6p\x814\xbf\x96\xfe\x0c\xce\x12mhI\x8f\xbf\x9f2B\xaa\x8a1|\xe3\xb4" +
+	"\xf5\xfdD\x0fl\x10\x8d㕄\xab\xa34Dž\xf8\x8d\x16\xd46\x1f\x04m1߭\xe7MA\x93" +
+	"\xd1G\xeeǐ\xd2[2$\x09\xcbA\xdb\x0dVd\xc7\x05\xb1W\xf88%)%\xa0#\xaa\xd5" +
+	"\xe7+:Ly+\x0a\xa7Ytئ\xc4jj\xd1x\x22\xd5\x14\x94\xebYHc\xd6&\xfb.\xfab" +
+	"\x0e\xa4=\xd14X\x22m\x22.\x22\xb4E\x9f\xef\x7f\xff7\xebP\xb6\xcf\xe4\xa7" +
+	"{վ\xa6\xfe\xc6\xe5\xf4\x02\x10\xf3\x9dØMI`\xce\xe8*\xd0\x0ac=\xe0um\x13w" +
+	"\xfd*\xa4\x11\xf7_$\xbfb\xf57>\x91\\J%`\x12\x10\x91\x02}\x06#\xb5\xcb%" +
+	"\x1d=,\x01\x95\xc0\xb1\x8b*\xdb\x10۸\x17\xc8\xe3\xfeo\xb0\xdeZ\xb1\x8e" +
+	"\xad\x0e\u0557!s\xb8M`\xa2u\xee>o\\\x0c*d\x81\xe7zf`\xce\xf5\x84\x11\x05" +
+	"\x1d\xfdů\x89\xc1\xa0\x14k\x05\x9a\x08\x9c\xbe\x0c\xa3\xc3s\x83_h\x85" +
+	"\xeb\x0a\xf6\u0090\xac\x1e\xf4A\x02\xe2\x8c^\xb0sS\x08\xcf_|\xee۱\xcaji." +
+	"4ň\xb5\x96w\x91A~\xfc\xe1:$^\x92\xd3p\xbf\xe7_\x0b\xb8]Z\x85\xbbF\x95x" +
+	"\xbe\x83D\x14\x01R\x18\x15R\xa2\xf0\xb0\x0b\xe3\x9d\xc9J kU\x00\x04\x97R" +
+	"o\xae\xd4ct\xb7\x8aeX\xe5$\xe8\x10\x0f\x1eTV\xfe\xa9vAU\xedw\x06~`\xd6" +
+	"\xc2\xefhƹ>\xd1k\x0f9(\x9c6\xa3-<ù\xde\x0dп]\x92-\x02\xd9i\xc7Oܭ\x82\x0c" +
+	"\x992\x9c6K\xec\xb6kI\xd6\xecZ+j\xff\x92\xd4?pVP\xa9\xe1\x03g\xb4\xb1" +
+	"\xf6d\x85!XqTu\xd1\xe5w~\xec\x91u\xe1\xcau\x99^!\x12\xf7N\x17\xac\xfa" +
+	"\xeb\x1e\x09Farvardin\x0bOrdibehesht\x07Khordad\x03Tir\x06Mordad\x09Shah" +
+	"rivar\x04Mehr\x04Aban\x04Azar\x03Dey\x06Bahman\x06Esfand\x02AP\xfeo4E" +
+	"\xf1\xca6\xd8\xc0>\xf0x\x90Գ\x09\xfe\xf7\x01\xaf\xd1Y7x\x89\x0e\xe4/\xb9" +
+	"\x8f{@\xdb@\xa1~\xf4\x83T\xc9D\xb5\xb1;\x1fe\xe2F\x8a|P\xe0\xf2\xb9\xdc." +
+	"9\xf2\x88\x17\xb5\xf8\xb6(\xb1\xa34\x94\xd6\xcd1\xa9_&\xdbñҎ\x01\xf0\xce" +
+	"yX\xd5\xffY\xe9*sBR\xb4\xa7\x92uh\xd14gn H\xab\x09\x86*\x11\x91j\xb5\xb1" +
+	"\x00\x95\x93f?\x17\xdc\x03\x06\xc1\xb1\xe8n\x1d\xf7\xdaw\xdat\xa5%\xaa:b" +
+	"'\x81\x977B;M=\x1c\xeb\x8a\xfa\xac\xcf\xf5f\x0c;+\x98\xb0ꅴ\xf37L\xa5\x93" +
+	"(\x08sG\x06\xf8\xbe\x0d\xfd\x1f\x18\x87\x12ݷ\x0d\x05\xe1w\xb3t\xb4e ka" +
+	"\x8dD\xa4-\xeaP\u05f7\x8d\xcbU2`WV\xf1\xc3G\xfd\x95Y;\x22\x8f\x8a\x0c;" +
+	"\xcdp֙\xf7.1o\xd2\u0590\xa1\xe7cla\xfcJ\x99\xbd>\xc73]r\x8eCk!\x95Jo\xd5" +
+	"\xe7W\xd1\xc3\x03Era\x05Month\x0alast month\x0athis month\x0anext month" +
+	"\x06+{0} m\x06-{0} m\xfeQHs\xc6\xd4tx*\xf5b\xe27\xdaT\xee\x1a\xb1\x84" +
+	"\x14\xb1\xd2E\x95R=\x9d\x00u\xe5u\x7fT\xd5\x14\xe0\xdf\xd5\x18\xe5q\x8e" +
+	"\xb4\x15S\x0c\x94\u05ff\xd3.vE\xacn\x99\xb1\xf9(ƃ\xcc\xef\xeej32y\xc0" +
+	"\xc1\x03X\xf4\x02\xc2\x084\x9b\xa3;\xaf\xb0X1æ\xe68\x8f\xa9E8=U\xefӐB4" +
+	"\xff\xc4O\xc9R\xab\xafN\x05H\xc9\x1d\xa2\x15U\x80\x9c\xd0\xc8\x1ay\xbb*r" +
+	"f\x9cW\x16^\xa4\xaf_/\xbc\xf2\xe7\xf68\xcf\xdc\xd8q\xcaRE\x00Yp06\x9a" +
+	"\xc90\xa3\x08\xce\x19Y\xff\x22H\x83\xbf\x00`\x94\x06r\x85\x965\xc9\x0d^J" +
+	"{Ks,\xe3o\xed(\x1f$\x10ݱ\x9a\xbf{J^3\xf5_\x9a\x1d\xb6\xd4m\x1a2P\xafR`" +
+	"\xbeTB+\xb9\x1b<\x08&\xa8\x8a\x18\xf8\x8cy\xc0\xcb\xed\xf1@}\x0b\xbf\xac" +
+	"H\x048\xf9\x0co\x92\xfa!$\x9b6\xabnY\xc05\x0cݷ\xf3\xa5\x0dE\x97\x03Mo1" +
+	"\x03Mo2\x03Mo3\x03Mo4\x03Mo5\x03Mo6\x03Mo7\x03Mo8\x03Mo9\x04Mo10\x04Mo11" +
+	"\x04Mo12\x0bFirst Month\x0cSecond Month\x0bThird Month\x0cFourth Month" +
+	"\x0bFifth Month\x0bSixth Month\x0dSeventh Month\x0cEighth Month\x0bNinth" +
+	" Month\x0bTenth Month\x0eEleventh Month\x0dTwelfth Month\x03Rat\x02Ox" +
+	"\x05Tiger\x06Rabbit\x06Dragon\x05Snake\x05Horse\x04Goat\x06Monkey\x07Roo" +
+	"ster\x03Dog\x03Pig\xfeѝ\xe0T\xfc\x12\xac\xf3cD\xd0<\xe5Wu\xa5\xc45\x0b" +
+	"\x9al\x9f?ium\xfc\x96\xb4\xf4\x7f\xfb\xc6\xf1\xff\x9e\x22\xe2\xc9m\x8f" +
+	"\xd25rg\x87L\x15Y\x10\x80\xd2t\xb5\xe5\x90\x08xH7\xfa\xdb\x02\xf70\x1fИJ" +
+	"\x88G\x99\xd6\x1a\x83\xb8\xbdz<\xf1\xc9t\U000953c1\xa5N\xa8\x0e\xbe\x05." +
+	"n\x87R\xf1\xbf\xc8>m%O?@4\xd4\xe8\xf1\x04Y\xb1_\x11\x1b\xb3\x17\xc8R\xed" +
+	"EHn\xa5\xf7>\xaf9:1?\x9eG\x0cg\xd0M \xbc\xcf+)\x86A\xd2qo\xbd\x18\x12N" +
+	"\xe4`:\x8fk|?\x8d/\x90\x8c\xe7d\xe4\x08\x9e\x8dO\x15L\x92@\xa5w}F\x7f" +
+	"\x84r7u\x10\x12/AΞ\xc0\xf9\x89\xb57\x1ct\xbe\x9e&\x9e\xfba\x85;\u05cb" +
+	"\xc2S\xc0\x97\xe3\x81]\xedg\xf6\xf6t\xd2\xfc\x1ezM\xf0\x08\x87\xeb\x12" +
+	"\x8f\xffd\x8a>\x09\xa5\xaa\x9ag&?\x0d\xadV\x93x!Xi{\x99\x04\xf4A r\xfeho" +
+	"\xd1\xffQ\x8f\xd4\xc1\xe1\x83i\x88\x9a\xfe\xfc<\x14\xd3G\x10\x94GA|\x17M" +
+	"2\x13\x22W@\x07\x8c-F\x81A\xe1\xb4y$S\xf18\x87v)\x07\x9b\x13R\x02\xf7<" +
+	"\x86\x1eD,3\xf6\xc9̳\xc3\xc3)HYX\xfbmI\x86\x93^\xe5\xa9\xe9\x12!\x82Y" +
+	"\xcf}a*-y\xf3\x1e6&\x91N\xe2\xec\x14\x95\x16,\x80\x1e=[E\x80\xca\xc9]." +
+	"\xed\x0fH:X\xd1lN}\x1d\xe0\xf1\xba'\xd6\x04\xf6u\x06\xc2\xdf\xd1g\x032" +
+	"\xabp55Yu'\xef\x1e>\x7f\x07\x92\xa7\x0eg\x12\xbb\xdaX\xe0p\x9c;\xd82." +
+	"\xa4\xc9w\xfa!\xfb\x9eD\xdd\xe7\xb7\xe2\xfa\xb9\xd8ٽ\xf4mB\x9a\xa1\xafo" +
+	"\x83ˣŷ#m<\x86WU\x8e\xea\xa5p:\xd4e_ܜ\xd2\xcf\x1e\u07fb$W\x96i\xa0\xc1" +
+	"\x00\x15o\xf8\x10\xb6h\xc2ײ:\x80\xfdO\xf5\xed\xf0\xcf4\x8d!L\x03Dc\xf2&" +
+	"\x8c\xcf\x15\xf6\xe3\xc3L\xbak\x08enWideM1\x08enWideM2\x08enWideM3\x08en" +
+	"WideM4\x08enWideM5\x08enWideM6\x08enWideM7\x08enWideM8\x08enWideM9\x09en" +
+	"WideM10\x09enWideM11\x09enWideM12\x0aenNarrowM1\x0aenNarrowM2\x0aenNarro" +
+	"wM3\x0aenNarrowM4\x0aenNarrowM5\x0aenNarrowM6\x0aenNarrowM8\x0aenNarrowM" +
+	"9\x0benNarrowM10\x0benNarrowM11\x0benNarrowM12\x0dBefore Christ\x11Befor" +
+	"e Common Era\x0bAnno Domini\x0aCommon Era\x02BC\x02AD\xfe\xfe\x1f8{\x91g" +
+	"\xb7\xd7\xcd\xde#Xk\xe6\x85\xd8Ì\x8e\xf7g\xf0\x10\xd02\xbdJN\x8f\xf8\x15" +
+	"A\xad\xfd\xcae\xac\xb6\xf7\xe1$9\xb9\xa2 \xb5\x8a\xf1f\x1d/N\xd0\xff\xb2" +
+	"_\xaaC͑Y\x1d\xcd$ua[\xaa\x1e\x01I\xf0\xbc\xb7\x0b\xc426\x15Ș\x19\x88\x94" +
+	"\x8b\xd5\xf7\xb0\xa4\xbd\\\xdb=\xafZ\x98A\xa9\xbc'\xdc\xec\xa9wCB\xaf" +
+	"\xe0\xdb\xf3\xb9\x03\xa2\xa0\x1ad\x98ـ-\xb4C\xa45K\xb5\xa6\x15\x87\xa9" +
+	"\xe9\x94j?\xb1\x9e\x10\xdf\x0dv\x7f\x1ai \x087\xe5\x17\xd2!y\x93M[\xa7ܳ" +
+	"\xfa\xae1ר\xe5\xfe\xe9y\xb9\xfc\x80F}Zje\xed\xbc\xc8Y.h\xfb\xb5 * S\xba" +
+	"\xba\xa8\xce\u07be\x03\xa6\x05\xcf\xe7,\x16i\x0ap\xbd\x16\xd6\xda$\xaf}0" +
+	"\xf1&\x0bCT\x19\x82x\xd5\x0c\xc7\x13\xf8\xa2R&~\x0b\xa5F\x8f\xa6\x8cݺ\\_" +
+	"\x06\xf8\xfc$\xbc\xda\xc1H\xe2\xf4\x7f\x84}L\x83\xfb{\xfe@\x09\xa8HF\xaf" +
+	"\xedRx\x9f\xbd\x0c\x0d\x06\xa5b\xebm\x9e#\xebwI\xfeDp}K\xc1\xd7\xe0\x86#" +
+	"\x1c;\x0f\xed\x0e`\x05\x9b\x86EI5w\xd9\x05\xfe\xb0zx\xc7T0v֚?S\xaf\xb2" +
+	"\x9b\x1a\x86\x12ꔚg\x14FB\xe8\x8fKvͫ\xfaz\x9c\x82\x87e\x08\x1f\x9c\x97" +
+	"\xc3\xc2 \x7f\x1a\xd2M#\x1f\xc2B\xcdJ\x05\xf5\x22\x94ʸ\x11\x05\xf9̄PA" +
+	"\x15\x8f\x0e5\xf3\xa6v\\ll\xd89y\x06\x08\x01!~\x06\xe3\x04_\xa3\x97j\xec" +
+	"\xeamZ\xb0\x10\x13\xdaW\x18pN\x1a\xab!\xf2k<\xea\xca\xe9%\x19\xf1\xb9" +
+	"\x0a\x84\xc1\x06\x84\xcb\x08\xe4\xe2\x037\xf2\x92ǭ\xd4\x0c\xf3;4b<\xc5.%" +
+	"\xc2!\x079\x8b\x9dG\xc9U\x86\xe6\\22\xf6\xee\xb5lʆ%\xbd\x9e\xfeQV\xf3u" +
+	"\xa7\xd4r \xecV\xc8V\xb1\x96\xb4\x9f2D\x88m\x13\x94\xa6X瘳\xc9\xcc\xe8K[y" +
+	"\xa4L\x01'IPP\xfe\xaaI+\xef)l\x86lE\xb8\xd4=\x81\x0f\x0b9렭\xf7_H\xaa\xf1" +
+	"\x0c\x17\xcf6\xa4\x02\xe1T\xf9\x14\xe9\x0e\xd5WmE}\xa5)\xe7s\xfc\x0c16" +
+	"\xd4U\xaa\x8d\xc9\xe0m\xd6\x0a\x0e\xf5ȷ9\xfen_\x02=U&vcX\x80EY U\x93\x02" +
+	"9\x02A\x86\xe5HGX\xf4\xed\x9ckFx(\xa2?\xfa7\x17\x8eCce\xb9\x0f5\xac\xbc" +
+	"\xf4\xa6\xe2C5\xdd\x08{\x1e\xd9c\x96>K\xc3\xf83\xaaܾ%\xf3\x91\x1b\xf8U" +
+	"\x1f\xfa<\xfd\xefв\x1b̹\x19f\xb2O\x81>f渃@\xf47l\xc9k\x13F\x1a\xa3\x84" +
+	"\xad\xa0\xda=_z\xf1́\x13l\xf6J\xd0\xdb\xe6\xed\x9d^ݹ\x19\x0fK\xa1H\x0b-" +
+	"\x7f\xed\xa8\xde&V\xbc\x9ak\xb8\x15\xc2\x12bWU\x08N1#\xe1W9ޗӬ\xacG\x80" +
+	"\xb2\x83ozH\xcd?\xd0T\x04ϭ\x03\xccfi\x05\xec\x02k\x9ej\x94\xa9S\xf2\xd4" +
+	"\xf8\x16r\x03era\x05month\x09enFutMOne\x0benFutMOther\x0aenPastMOne\x0ce" +
+	"nPastMOther\x03mo.\x08last mo.\x08this mo.\x08next mo.\x0eenShortFutMOne" +
+	"\x10enShortFutMOther\x0fenShortPastMOne\x11enShortPastMOther\x0a001AbbrM" +
+	"o1\x0a001AbbrMo2\x0a001AbbrMo3\x0a001AbbrMo4\x0a001AbbrMo5\x0a001AbbrMo6" +
+	"\x0a001AbbrMo7\x0a001AbbrMo8\x0a001AbbrMo9\x0b001AbbrMo10\x0b001AbbrMo11" +
+	"\x0b001AbbrMo12"
+
+var bucket1 string = "" + // Size: xxxx bytes
+	"\xfe\x99ҧ\xa2ݭ\x8a\xb6\xc7&\xe6\xbe.\xca:\xec\xeb4\x0f\xd7;\xfc\x09xhhkw" +
+	"'\x1f\x0fb\xfb8\xe3UU^S%0XxD\x83Zg\xff\xe7\x1ds\x97n\xef\xf95\xd3k\xbf$:" +
+	"\x99\xbbnU\xba:n\xdeM.\xa4st\xa6E\x0eG\xf5\xf0\xd6.Q-\x1e8\x87\x11X\xf2" +
+	"\x19\xc1J\xacI57\xdc\x07\xf0\x87\xc1cMc\x9e\xdc\x0a\xb3%\xff\x03\xe2aR" +
+	"\x06,\xbf!4J\x8b]4ΙWš\x1dY2\x88:\xb9Q\x16\xfc\xb5r\xf7\xc5d^\x97\x08\xce" +
+	"\x04EG@\u05fa\x88\x885\x08\x8c/\x83r\x92\xb8\x96\xd4\xfa\x8d\x18\x0fF" +
+	"\xfd\xa2\x01\xfb\xb0\xa0ڐӔ\xca\xcd\xf7@=\xe2\x96\x03\x87\x8aH\xfa\xc3L" +
+	"\xa2\xe90H\x93\xf6\x80\x8ck\x05)u{d\xa4\x19D\xd4{\xfd\xb8\xc5\xc0)\xea" +
+	"\x01\x9b\xcb&\x12\x87y\xf6{\xbb\xcdm\x0az/\xcb\xce#\x1c\x86R\xccy\xdbC" +
+	"\x7f\xa2\x96\x94\xc2\x22O/\xe4t\xfe\xba4 \xc3\xf1Hdy{܃L\x9aG\xa3\xa9\xea" +
+	"!LmW\x05\x9d$\x01\xe5wp\x8a'<\xc1\xcao\x8d\x1b\x8d\xd8h\xccX\xdc\xe4\xfd" +
+	"j\xf6\x0b\xa5'\xad\xe2\x1a\x16\x8fD\xde5\x0d\xaeL\xeft\xe1\x1f/\xd8\xec" +
+	"\xc9\xc0\xc6C#\x18\xfa\x93\x11Wt\x82\xfc\xa7\x1c\x82\x1b\xfd\x95`\xbd" +
+	"\x9f;[\xb3\x9e'\xe8DmA/^Ŭ]\x15-\xf9ـb\xea\xe9\x1f\xd9̂\x92\xc8\xddL%\xaf" +
+	"\xd0\xcc\xc7\x02L\xbb:P3\x22\xbfU\x81\U000d06a1\xa2\xf9q\x96\xbc2\x8e" +
+	"\x8f\xb4\x80\xbe\x06`\x8b\x0b\xaf\xd2\xd2J\xccV>\xc7d\xf5\xfd\x1c?\xbc7⏟" +
+	"\xb9%\xf0\xc4\xfe\xf3P\xed\x13V<CG\x99\x12\xc2 \x8e1\x0e\xcej\x12}\xe2P" +
+	"\xe4\x22\xba\xf5\xb0\x98q|A\xc5\xc8\xc2\xc8\x18w\xb7yb;n\x97\\6F\xe8\xd1" +
+	"1\xe2Eh\x0b\x95\x09v\xc0Ze?y\xeb\xcc\xe2\xa3\xf26ۦ\xec\x02f\x11oto\xe9z" +
+	"\x89\xfe\x0e\x7fh\xd1\xf3\x02\x86\xde]\x86\x0a\xbeq7R\xb0\xa1\xf8\x9eLj" +
+	"\x05\xc4\xfd\xa7B\xe4\xbc8\xff\x1ao\xff\xc7r\xb2I\xec\x94a\x84ԯ\xe6\x919" +
+	"\x8a\xe3\xc5kM\xe1\x09\x02?\x18jtstj\xbe\xe3P}G\xd0e\xc8Ď\x1e\xaa$\x97" +
+	"\xbce\x18mx6\xaf\xe10vP\xde\xc5#\xb0\xca\xc7N\x94駢\xf0\xc35\xf6\xb6c\x00" +
+	":\x18\x22\x1dM\xd2\x1a\\\xdb`\xc1v\x18\xfdh\xae\x1d\xc0\x96}{mSXn]\xd29" +
+	"\xfdϧT\xccu\xd5\xc0\x88JΆ\x9c:\xd3\x7fﺉc\x1a%Œ:\x9cln\xaa\x08\x1e\x85U+e" +
+	"\x958V `\xc3C\x0d\xd9ُB\xb0ҁt\xa7\x16\x90_\x84\xc1e\xd4m\x17M\x04\xbe*`" +
+	"\x9dS\x0e\x01M\xa6\xb7va\xa0\xeb\xf9\xb6\xaeP>ܦ\xd7FR\x9b7\xabPu\xaa\xcf" +
+	"\xfca;k\xb2+\xe0zXKL\xbd\xce\xde.&\xf5ԛ\xbck\x1b\xd4F\x84\xac\x08#\x02mo" +
+	"\x0f001ShortFutMOne\x11001ShortFutMOther\x12001ShortPastMOther\x10001Nar" +
+	"rowFutMOne\x10001NarrowFutMTwo\x12001NarrowFutMOther\x11001NarrowPastMOn" +
+	"e\x13001NarrowPastMOther\x08gbAbbrM1\x08gbAbbrM2\x08gbAbbrM3\x08gbAbbrM4" +
+	"\x08gbAbbrM5\x08gbAbbrM6\x08gbAbbrM7\x08gbAbbrM8\x08gbAbbrM9\x09gbAbbrM1" +
+	"0\x09gbAbbrM11\x09gbAbbrM12\x08gbWideM1\x08gbWideM2\x08gbWideM3\x08gbWid" +
+	"eM4\x08gbWideM5\x08gbWideM6\x08gbWideM7\x08gbWideM8\x08gbWideM9\x09gbWid" +
+	"eM10\x09gbWideM11\x09gbWideM12\x0agbNarrowM1\x0agbNarrowM2\x0agbNarrowM3" +
+	"\x0agbNarrowM5\x0agbNarrowM6\x0agbNarrowM8\x0agbNarrowM9\x0bgbNarrowM10" +
+	"\x0bgbNarrowM11\x0bgbNarrowM12\xfeG*:*\x8e\xf9f̷\xb2p\xaa\xb9\x12{и\xf7c" +
+	"\u0088\xdb\x0ce\xfd\xd7\xfc_T\x0f\x05\xf9\xf1\xc1(\x80\xa2)H\x09\x02\x15" +
+	"\xe8Y!\xc2\xc8\xc3뿓d\x03vԧi%\xb5\xc0\x8c\x05m\x87\x0d\x02y\xe9F\xa9\xe1" +
+	"\xe1!e\xbc\x1a\x8d\xa0\x93q\x8b\x0c߮\xcdF\xd1Kpx\x87/is\xcc\xdd\xe0\xafʍ" +
+	"~\xfeҜl\xc2B\xc5\x1a\xa4#ث,kF\xe89\xec\xe6~\xaa\x12\xbf\x1a\xf6L\x0a\xba" +
+	"\xa9\x96n\xf1\x03Ӊ<\xf5\x03\x84dp\x98\xe1d\xf7'\x94\xe6\x97\x1a4/\x05" +
+	"\x99\x8f.\x7foH@\xe9\x1a\xda6`MQ\xad\x0d\x08\x99؟+\xe53\xbf\x97\x88~\xe6" +
+	"eh\xb7\xaf\xaf<\xe1|\xb9\x0cF\xe0\xda\xf2\xbd\xff\x19\xaa\x95\x9b\x81" +
+	"\xc3\x04\xe3\x1f\xd5o]$\xf5\x0f\xbbzU\xf2a\xb0\x92[\xfeX\x03\x1f\xdc\x0c" +
+	"\xd5I\xc0a_\xbd\xd8\xde\u009a\x1a@t\x1e\x7f\x8f&\x0c\x8d\xfeM\xd7ڟX\x90" +
+	"\x97\xfe%\xa3'\x88\x81\xb5\x14l\x0bL\xd9>\x8d\x99\xe2=ƭu,\x9aT \x06\xc1y" +
+	"\\\x01wf\xdcx\xab\xa1\xee\xec\x82\x1e8\xb09$\x88\xfe<\xb5\x13g\x95\x15NS" +
+	"\x83`vx\xb9\xb7\xd8h\xc7 \x9e\x9fL\x06\x9a\xadtV\xc9\x13\x85\x0d8\xc15R" +
+	"\xe5\xadEL\xf0\x0f\x8b:\xf6\x90\x16i۰W\x9dv\xee\xb6B\x80`Ωb\xc7w\x11\xa3" +
+	"N\x17\xee\xb7\xe0\xbf\xd4a\x0a\x8a\x18g\xb82\x8e\xaaVCG\xc3Ip\xc0^6\xa8N" +
+	"\xf1\xebt\xa6\xa4\x0cO\xd9c\x97\x8f\xfa\x11)\x1bHY\xa2ӄ\x1bLc\xd6\x08" +
+	"\x06\xbfj`?3s\x89\xb8\x82(\xaf\xef\x84\xdfz\xc3\x12\xf1b\xd4\xf7ir\xe8," +
+	"\x8apœ\x00F\xa6b+\xfa}\x03\x14..\xcb1l\xac\x93\xee\x19\x12\xaa\xbbo\x95" +
+	"\xf3?ݔ7\x84\xb2b\x0c4\x81\x17\xf2K@\xde\x18\x99Q\x17n\xe5?\xdao\xc6(\xfc" +
+	"\x9b\xees\xc6V\x91\x0dْ\x1d\x06g9o"
+
+	// Total table size: xxxx bytes (14KiB); checksum: C44173A9
diff --git a/internal/cldrtree/tree.go b/internal/cldrtree/tree.go
new file mode 100644
index 0000000..6d4084b
--- /dev/null
+++ b/internal/cldrtree/tree.go
@@ -0,0 +1,181 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldrtree
+
+import (
+	"golang.org/x/text/internal"
+	"golang.org/x/text/language"
+)
+
+const (
+	inheritOffsetShift        = 12
+	inheritMask        uint16 = 0x8000
+	inheritValueMask   uint16 = 0x0FFF
+
+	missingValue uint16 = 0xFFFF
+)
+
+// Tree holds a tree of CLDR data.
+type Tree struct {
+	Locales []uint32
+	Indices []uint16
+	Buckets []string
+}
+
+// Lookup looks up CLDR data for the given path. The lookup adheres to the alias
+// and locale inheritance rules as defined in CLDR.
+//
+// Each subsequent element in path indicates which subtree to select data from.
+// The last element of the path must select a leaf node. All other elements
+// of the path select a subindex.
+func (t *Tree) Lookup(tag int, path ...uint16) string {
+	return t.lookup(tag, false, path...)
+}
+
+// LookupFeature is like Lookup, but will first check whether a value of "other"
+// as a fallback before traversing the inheritance chain.
+func (t *Tree) LookupFeature(tag int, path ...uint16) string {
+	return t.lookup(tag, true, path...)
+}
+
+func (t *Tree) lookup(tag int, isFeature bool, path ...uint16) string {
+	origLang := tag
+outer:
+	for {
+		index := t.Indices[t.Locales[tag]:]
+
+		k := uint16(0)
+		for i := range path {
+			max := index[k]
+			if i < len(path)-1 {
+				// index (non-leaf)
+				if path[i] >= max {
+					break
+				}
+				k = index[k+1+path[i]]
+				if k == 0 {
+					break
+				}
+				if v := k &^ inheritMask; k != v {
+					offset := v >> inheritOffsetShift
+					value := v & inheritValueMask
+					path[uint16(i)-offset] = value
+					tag = origLang
+					continue outer
+				}
+			} else {
+				// leaf value
+				offset := missingValue
+				if path[i] < max {
+					offset = index[k+2+path[i]]
+				}
+				if offset == missingValue {
+					if !isFeature {
+						break
+					}
+					// "other" feature must exist
+					offset = index[k+2]
+				}
+				data := t.Buckets[index[k+1]]
+				n := uint16(data[offset])
+				return data[offset+1 : offset+n+1]
+			}
+		}
+		if tag == 0 {
+			break
+		}
+		tag = int(internal.Parent[tag])
+	}
+	return ""
+}
+
+func build(b *Builder) (*Tree, error) {
+	var t Tree
+
+	t.Locales = make([]uint32, language.NumCompactTags)
+
+	for _, loc := range b.locales {
+		tag, _ := language.CompactIndex(loc.tag)
+		t.Locales[tag] = uint32(len(t.Indices))
+		var x indexBuilder
+		x.add(loc.root)
+		t.Indices = append(t.Indices, x.index...)
+	}
+	// Set locales for which we don't have data to the parent's data.
+	for i, v := range t.Locales {
+		p := uint16(i)
+		for v == 0 && p != 0 {
+			p = internal.Parent[p]
+			v = t.Locales[p]
+		}
+		t.Locales[i] = v
+	}
+
+	for _, b := range b.buckets {
+		t.Buckets = append(t.Buckets, string(b))
+	}
+	if b.err != nil {
+		return nil, b.err
+	}
+	return &t, nil
+}
+
+type indexBuilder struct {
+	index []uint16
+}
+
+func (b *indexBuilder) add(i *Index) uint16 {
+	offset := len(b.index)
+
+	max := enumIndex(0)
+	switch {
+	case len(i.values) > 0:
+		for _, v := range i.values {
+			if v.key > max {
+				max = v.key
+			}
+		}
+		b.index = append(b.index, make([]uint16, max+3)...)
+
+		b.index[offset] = uint16(max) + 1
+
+		b.index[offset+1] = i.values[0].value.bucket
+		for i := offset + 2; i < len(b.index); i++ {
+			b.index[i] = missingValue
+		}
+		for _, v := range i.values {
+			b.index[offset+2+int(v.key)] = v.value.bucketPos
+		}
+		return uint16(offset)
+
+	case len(i.subIndex) > 0:
+		for _, s := range i.subIndex {
+			if s.meta.index > max {
+				max = s.meta.index
+			}
+		}
+		b.index = append(b.index, make([]uint16, max+2)...)
+
+		b.index[offset] = uint16(max) + 1
+
+		for _, s := range i.subIndex {
+			x := b.add(s)
+			b.index[offset+int(s.meta.index)+1] = x
+		}
+		return uint16(offset)
+
+	case i.meta.inheritOffset < 0:
+		v := uint16(-(i.meta.inheritOffset + 1)) << inheritOffsetShift
+		p := i.meta
+		for k := i.meta.inheritOffset; k < 0; k++ {
+			p = p.parent
+		}
+		v += uint16(p.typeInfo.enum.lookup(i.meta.inheritIndex))
+		v |= inheritMask
+		return v
+	}
+
+	return 0
+}
diff --git a/internal/cldrtree/type.go b/internal/cldrtree/type.go
new file mode 100644
index 0000000..b0809ab
--- /dev/null
+++ b/internal/cldrtree/type.go
@@ -0,0 +1,116 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cldrtree
+
+// enumIndex is the numerical value of an enum value.
+type enumIndex int
+
+// An enum is a collection of enum values.
+type enum struct {
+	name   string // the Go type of the enum
+	keyMap map[string]enumIndex
+	keys   []string
+}
+
+// lookup returns the index for the enum corresponding to the string. If s
+// currently does not exist it will add the entry.
+func (e *enum) lookup(s string) enumIndex {
+	x, ok := e.keyMap[s]
+	if !ok {
+		if e.keyMap == nil {
+			e.keyMap = map[string]enumIndex{}
+		}
+		x = enumIndex(len(e.keys))
+		e.keyMap[s] = x
+		e.keys = append(e.keys, s)
+	}
+	return x
+}
+
+// A typeInfo indicates the set of possible enum values and a mapping from
+// these values to subtypes.
+type typeInfo struct {
+	enum        *enum
+	entries     map[enumIndex]*typeInfo
+	keyTypeInfo *typeInfo
+	shareKeys   bool
+}
+
+func (t *typeInfo) sharedKeys() bool {
+	return t.shareKeys
+}
+
+func (t *typeInfo) lookupSubtype(s string, opts *options) (x enumIndex, sub *typeInfo) {
+	if t.enum == nil {
+		if t.enum = opts.sharedEnums; t.enum == nil {
+			t.enum = &enum{}
+		}
+	}
+	if opts.sharedEnums != nil && t.enum != opts.sharedEnums {
+		panic("incompatible enumss defined")
+	}
+	x = t.enum.lookup(s)
+	if t.entries == nil {
+		t.entries = map[enumIndex]*typeInfo{}
+	}
+	sub, ok := t.entries[x]
+	if !ok {
+		sub = opts.sharedType
+		if sub == nil {
+			sub = &typeInfo{}
+		}
+		t.entries[x] = sub
+	}
+	t.shareKeys = opts.sharedType != nil // For analysis purposes.
+	return x, sub
+}
+
+// metaData includes information about subtypes, possibly sharing commonality
+// with sibling branches, and information about inheritance, which may differ
+// per branch.
+type metaData struct {
+	b *Builder
+
+	parent *metaData
+
+	index    enumIndex // index into the parent's subtype index
+	key      string
+	elem     string // XML element corresponding to this type.
+	typeInfo *typeInfo
+
+	lookup map[enumIndex]*metaData
+	subs   []*metaData
+
+	inheritOffset int    // always negative when applicable
+	inheritIndex  string // new value for field indicated by inheritOffset
+	// inheritType   *metaData
+}
+
+func (m *metaData) sub(key string, opts *options) *metaData {
+	if m.lookup == nil {
+		m.lookup = map[enumIndex]*metaData{}
+	}
+	enum, info := m.typeInfo.lookupSubtype(key, opts)
+	sub := m.lookup[enum]
+	if sub == nil {
+		sub = &metaData{
+			b:      m.b,
+			parent: m,
+
+			index:    enum,
+			key:      key,
+			typeInfo: info,
+		}
+		m.lookup[enum] = sub
+		m.subs = append(m.subs, sub)
+	}
+	return sub
+}
+
+func (m *metaData) validate() {
+	for _, s := range m.subs {
+		s.validate()
+	}
+}