OSDN Git Service

new repo
[bytom/vapor.git] / vendor / golang.org / x / text / message / catalog.go
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.
4
5 package message
6
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.
9
10 import (
11         "golang.org/x/text/language"
12         "golang.org/x/text/message/catalog"
13 )
14
15 // DefaultCatalog is used by SetString.
16 var DefaultCatalog *catalog.Catalog = defaultCatalog
17
18 var defaultCatalog = catalog.New()
19
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)
23 }
24
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...)
28 }