Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/appwrite/src/services/locale.ts>Locale

[READ-ONLY] Official Appwrite Deno SDK 🦕
Latest
class Locale
extends Service
import { Locale } from "https://deno.land/x/appwrite@12.1.0/src/services/locale.ts";

Constructors

new
Locale(client: Client)

Methods

get(): Promise<Models.Locale>

Get user 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.

(IP Geolocation by DB-IP)

listCodes(): Promise<Models.LocaleCodeList>

List Locale Codes

List of all locale codes in ISO 639-1.

listContinents(): Promise<Models.ContinentList>

List continents

List of all continents. You can use the locale header to get the data in a supported language.

listCountries(): Promise<Models.CountryList>

List countries

List of all countries. You can use the locale header to get the data in a supported language.

listCountriesEU(): Promise<Models.CountryList>

List EU countries

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(): Promise<Models.PhoneList>

List countries phone codes

List of all countries phone codes. You can use the locale header to get the data in a supported language.

listCurrencies(): Promise<Models.CurrencyList>

List currencies

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(): Promise<Models.LanguageList>

List languages

List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.