Exemple #1
0
// Build builds the root Collator.
func (b *Builder) Build() (*collate.Collator, error) {
	t, err := b.build()
	if err != nil {
		return nil, err
	}
	return collate.Init(t), nil
}
Exemple #2
0
// Build builds a Collator for the given locale.  To build the root table, set locale to "".
func (b *Builder) Build(locale string) (*collate.Collator, error) {
	t, err := b.build()
	if err != nil {
		return nil, err
	}
	// TODO: support multiple locales
	return collate.Init(t), nil
}