Get user locale
Endpoint
gethttps://<REGION>.cloud.appwrite.io/v1/locale
Description
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.
Required scopes
Authentication
setProject() and authenticate with either a server API key (setKey()) or a signed-in user (setSession() or setJWT()). For direct REST calls, send X-Appwrite-Project with either X-Appwrite-Key or session/JWT headers.Locale
User IP address.
Country code in ISO 3166-1 two-character format
Country name. This field support localization.
Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America.
Continent name. This field support localization.
True if country is part of the European Union.
Currency code in ISO 4217-1 three-character format
using Appwrite;using Appwrite.Models;using Appwrite.Services;
Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
Locale result = await locale.Get();Localization
Get user locale
Endpoint
gethttps://<REGION>.cloud.appwrite.io/v1/locale
Description
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.
Required scopes
Authentication
setProject() and authenticate with either a server API key (setKey()) or a signed-in user (setSession() or setJWT()). For direct REST calls, send X-Appwrite-Project with either X-Appwrite-Key or session/JWT headers.Locale
User IP address.
Country code in ISO 3166-1 two-character format
Country name. This field support localization.
Continent code. A two character continent code "AF" for Africa, "AN" for Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC" for Oceania, and "SA" for South America.
Continent name. This field support localization.
True if country is part of the European Union.
Currency code in ISO 4217-1 three-character format
using Appwrite;using Appwrite.Models;using Appwrite.Services;
Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetSession(""); // The user session to authenticate with
Locale locale = new Locale(client);
Locale result = await locale.Get();