1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // TODO: some types in this file will need to be made public at some time.
8 // Documentation and method names will reflect this by using the exported name.
11 "golang.org/x/text/language"
12 "golang.org/x/text/message/catalog"
15 // DefaultCatalog is used by SetString.
16 var DefaultCatalog *catalog.Catalog = defaultCatalog
18 var defaultCatalog = catalog.New()
20 // SetString calls SetString on the initial default Catalog.
21 func SetString(tag language.Tag, key string, msg string) error {
22 return defaultCatalog.SetString(tag, key, msg)
25 // Set calls Set on the initial default Catalog.
26 func Set(tag language.Tag, key string, msg ...catalog.Message) error {
27 return defaultCatalog.Set(tag, key, msg...)