Documentation
¶
Index ¶
- type Locale
- func (srv *Locale) Get() (*models.Locale, error)
- func (srv *Locale) ListCodes() (*models.LocaleCodeList, error)
- func (srv *Locale) ListContinents() (*models.ContinentList, error)
- func (srv *Locale) ListCountries() (*models.CountryList, error)
- func (srv *Locale) ListCountriesEU() (*models.CountryList, error)
- func (srv *Locale) ListCountriesPhones() (*models.PhoneList, error)
- func (srv *Locale) ListCurrencies() (*models.CurrencyList, error)
- func (srv *Locale) ListLanguages() (*models.LanguageList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locale ¶
type Locale struct {
// contains filtered or unexported fields
}
Locale service
func (*Locale) Get ¶
Get get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
([IP Geolocation by DB-IP](https://db-ip.com))
func (*Locale) ListCodes ¶
func (srv *Locale) ListCodes() (*models.LocaleCodeList, error)
ListCodes list of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
func (*Locale) ListContinents ¶
func (srv *Locale) ListContinents() (*models.ContinentList, error)
ListContinents list of all continents. You can use the locale header to get the data in a supported language.
func (*Locale) ListCountries ¶
func (srv *Locale) ListCountries() (*models.CountryList, error)
ListCountries list of all countries. You can use the locale header to get the data in a supported language.
func (*Locale) ListCountriesEU ¶
func (srv *Locale) ListCountriesEU() (*models.CountryList, error)
ListCountriesEU list of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
func (*Locale) ListCountriesPhones ¶
ListCountriesPhones list of all countries phone codes. You can use the locale header to get the data in a supported language.
func (*Locale) ListCurrencies ¶
func (srv *Locale) ListCurrencies() (*models.CurrencyList, error)
ListCurrencies list of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
func (*Locale) ListLanguages ¶
func (srv *Locale) ListLanguages() (*models.LanguageList, error)
ListLanguages list of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.