Locale class
The Locale service allows you to customize your app based on your users' location.
Constructors
- Locale.new(Client client)
- Initializes a Locale service
Properties
Methods
-
get(
) → Future< Locale> - 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.
-
listCodes(
) → Future< LocaleCodeList> - List of all locale codes in ISO 639-1.
-
listContinents(
) → Future< ContinentList> - List of all continents. You can use the locale header to get the data in a supported language.
-
listCountries(
) → Future< CountryList> - List of all countries. You can use the locale header to get the data in a supported language.
-
listCountriesEU(
) → Future< CountryList> - 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.
-
listCountriesPhones(
) → Future< PhoneList> - List of all countries phone codes. You can use the locale header to get the data in a supported language.
-
listCurrencies(
) → Future< CurrencyList> - 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.
-
listLanguages(
) → Future< LanguageList> - List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited