1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00
mycorrhiza/auth/get_rid_of_it.go

23 lines
305 B
Go
Raw Normal View History

package auth
type L10nEntry struct {
_en string
_ru string
}
func En(v string) L10nEntry {
return L10nEntry{_en: v}
}
func (e L10nEntry) Ru(v string) L10nEntry {
e._ru = v
return e
}
func (e L10nEntry) Get(lang string) string {
if lang == "ru" && e._ru != "" {
return e._ru
}
return e._en
}