// Get returns a translator by language.
496512
func (m *Manager) Get(lang string) (t Translator, err error) {
	dirs := m.getDirs()
	for _, dir := range dirs {
		filename := filepath.Join(dir, lang+".yml")
		if files.Exist(filename) {
			return NewTranslator(lang, filename)
		}
	}
	return
}
136296
func (v *StructA) GetS() (o string) {
	if v != nil {
		o = v.S
	}
	return
}
86394
func (tm TranslatorMap) Find(lang string) Translator {
	// "zh-hans-cn": "zh-hans-cn" > "zh-hans" > "zh"
	if t := tm[lang]; t != nil {
		return t
	}

	for i := strings.LastIndexByte(lang, '-'); i != -1; i = strings.LastIndexByte(lang, '-') {
		if t := tm[lang[:i]]; t != nil {
			return t
		}
	}
	return nil
}
761687
func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) {
	return p.get(document, swag.DefaultJSONNameProvider)
}
1186117
func (v Bool) Get(deflt bool) bool {
	if !v.Defined {
		return deflt
	}
	return v.V
}
1124615
func (v Uint8) Get(deflt uint8) uint8 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
1312674
func (j *Js) Get(key string) *Js {
	m := j.Getdata()
	if v, ok := m[key]; ok {
		j.data = v
		return j
	}
	j.data = nil
	return j
}
161387
func (json *JSON) Get(name string) interface{} {
	return json.Result.Get(name).Value()
}
1332682
func (d *localeStore) Get(lang, section, format string) (string, bool) {
	if locale, ok := d.store[lang]; ok {
		if key, err := locale.message.Section(section).GetKey(format); err == nil {
			return key.Value(), true
		}
	}

	if len(d.defaultLang) > 0 && lang != d.defaultLang {
		return d.Get(d.defaultLang, section, format)
	}

	return "", false
}
426402
func (a StringA) Get(vals ...interface{}) (val string) {
	v := get(a("").arg(), vals)
	switch v := v.(type) {
	case *string:
		return *v
	case string:
		return v
	}
	return
}
1059998
func (t *Trie) Get(key []byte) (value interface{}, ok bool) {
	if n := t.search(key); n.external != nil && bytes.Equal(n.external.key, key) {
		return n.external.value, true
	}
	return
}
1124897
func (r *Request) Get(key string) interface{} {
	if r.Data == nil {
		return nil
	}
	return r.Data[key]
}
530779
func (a Uint64A) Get(vals ...interface{}) (val uint64) {
	v := get(a(0).arg(), vals)
	switch v := v.(type) {
	case *uint64:
		return *v
	case uint64:
		return v
	}
	return
}
327063
func (j *Json) Get(key string) *Json {
	m, err := j.Map()
	if err == nil {
		if val, ok := m[key]; ok {
			return &Json{val}
		}
	}
	return &Json{nil}
}
528239
func (r *Repository) GetLanguage() string {
	if r == nil || r.Language == nil {
		return ""
	}
	return *r.Language
}
499178
func (b *BiMap) Get(k interface{}) (interface{}, bool) {
	if !b.Exists(k) {
		return "", false
	}
	b.s.RLock()
	defer b.s.RUnlock()
	return b.forward[k], true

}
1296123
func GetLanguage(lang string) *Language {
	l, ok := languages[lang]
	if ok {
		return &l
	}
	return nil
}