code: func localeToLanguage(locale string) string {
  	locale = strings.Replace(strings.SplitN(locale, ".", 2)[0], "_", "-", 1)
  	langString, ok := localeToLanguageMap[strings.ToLower(locale)]
  	if !ok {
  		langString = locale
  	}
  	return langString
  }
docs: // localeToLanguage translates POSIX locale strings to BCP 47 language tags.