1 //go:generate go run datagen/language/genlang.go
5 // IsValidLanguageCode returns true if s is a valid ISO 639-1 language code
6 func IsValidLanguageCode(s string) bool {
7 _, _, err := LangCodeInfo(s)
14 // LangEnglishName returns the English name(s) corresponding to the language code
15 // s. If there are multiple names, they are separated by a `;`.
16 func LangEnglishName(s string) (string, error) {
17 en, _, err := LangCodeInfo(s)
21 // LangNativeName returns the native name(s) corresponding to the language code s
22 // in the native script(s). If there are multiple names, they are separated
24 func LangNativeName(s string) (string, error) {
25 _, nat, err := LangCodeInfo(s)