package common

func GetLangTypeMap() (r map[LangType]string) {
	l := []LangType{LangTypeChinese, LangTypeEnglish}
	r = make(map[LangType]string)
	for _, k := range l {
		r[k] = k.ToString()
	}
	return r
}
func GetLangTypeReverseMap() (r map[string]LangType) {
	l := []LangType{LangTypeChinese, LangTypeEnglish}
	r = make(map[string]LangType)
	for _, k := range l {
		r[k.ToString()] = k
	}
	return r
}
func GetLangTypeReverseIntMap() (r map[string]int) {
	l := []LangType{LangTypeChinese, LangTypeEnglish}
	r = make(map[string]int)
	for _, k := range l {
		r[k.ToString()] = int(k)
	}
	return r
}

func (t LangType) Check() bool {
	l := []LangType{LangTypeChinese, LangTypeEnglish}
	for i := range l {
		if l[i] == t {
			return true
		}
	}
	return false
}
