// GetLocale returns a pointer to an existing locale object and a boolean whether the locale exists.
965133
func GetLocale(locale string) (*Locale, bool) {
	l, ok := locales[locale]
	return l, ok
}
86062
func (c *UsersListCall) IncludeLocale(includeLocale bool) *UsersListCall {
	c.includeLocale = includeLocale
	return c
}
758715
func SimplifiedLocale(lang string) string {
	// en_US/en_US.UTF-8/zh_CN/zh_TW/el_GR@euro/...
	if idx := strings.Index(lang, ":"); idx != -1 {
		lang = lang[:idx]
	}
	if idx := strings.Index(lang, "@"); idx != -1 {
		lang = lang[:idx]
	}
	if idx := strings.Index(lang, "."); idx != -1 {
		lang = lang[:idx]
	}
	return strings.TrimSpace(lang)
}
632393
func (s *ClusterStateService) Local(local bool) *ClusterStateService {
	s.local = &local
	return s
}
269455
func (s *CombinedPrimitiveSlice) UpsertLocal(l interface{}) {
	v := s.upsert(l)
	v.local = l
	v.localSet = true
}
837021
func (s *DescribeFindingsInput) SetLocale(v string) *DescribeFindingsInput {
	s.Locale = &v
	return s
}
447355
func lookupLocal(use use) binding {
	for env := use.env; env != nil; env = env.parent {
		if bind, ok := env.bindings[use.id.Name]; ok {
			if bind.scope == Free {
				// shouldn't exist till later
				log.Fatalf("%s: internal error: %s, %d", use.id.NamePos, use.id.Name, bind)
			}
			return bind // found
		}
		if env.function != nil {
			break
		}
	}
	return binding{} // not found in this function
}
957873
func (c *ChannelsInfoCall) IncludeLocale(includeLocale bool) *ChannelsInfoCall {
	c.includeLocale = includeLocale
	return c
}
178062
func getLocalCurrencyAndExchangeRate(mctx libkb.MetaContext, remoter remote.Remoter, account *stellar1.OwnAccountCLILocal, exchangeRates exchangeRateMap) error {
	displayCurrency, err := stellar.GetAccountDisplayCurrency(mctx, account.AccountID)
	if err != nil {
		return err
	}
	rate, ok := exchangeRates[displayCurrency]
	if !ok {
		var err error
		rate, err = remoter.ExchangeRate(mctx.Ctx(), displayCurrency)
		if err != nil {
			return err
		}
		exchangeRates[displayCurrency] = rate
	}
	account.ExchangeRate = &rate
	return nil
}
1147237
func (s *Audio) SetLocale(v string) *Audio {
	s.Locale = &v
	return s
}
104827
func (s *ScheduleRunConfiguration) SetLocale(v string) *ScheduleRunConfiguration {
	s.Locale = &v
	return s
}
791946
func (ctrl Controller) SwitchLocale(w http.ResponseWriter, req *http.Request) {
	utils.SetCookie(http.Cookie{Name: "locale", Value: req.URL.Query().Get("locale")}, &qor.Context{Request: req, Writer: w})
	http.Redirect(w, req, req.Referer(), http.StatusSeeOther)
}
1296123
func GetLanguage(lang string) *Language {
	l, ok := languages[lang]
	if ok {
		return &l
	}
	return nil
}
419564
func (s *GetMappingService) Local(local bool) *GetMappingService {
	s.local = &local
	return s
}
205275
func SetLocale(category uint, locale string) string {
	clocale := C.CString(locale)
	defer C.free(unsafe.Pointer(clocale))

	return C.GoString(C.setlocale(C.int(category), clocale))
}
752843
func unixLocale() string {
	for _, env := range []string{"LC_ALL", "LC_CTYPE", "LANG"} {
		if locale := os.Getenv(env); locale != "" {
			return locale
		}
	}
	return "US-ASCII"
}
698111
func (s *PutBotInput) SetLocale(v string) *PutBotInput {
	s.Locale = &v
	return s
}