Appwrite
  1. locale
Appwrite
  • account
    • Delete Account
      DELETE
    • Get Account
      GET
    • Create Account
      POST
    • Update Account Email
      PATCH
    • Create Account JWT
      POST
    • Get Account Logs
      GET
    • Update Account Name
      PATCH
    • Update Account Password
      PATCH
    • Get Account Preferences
      GET
    • Update Account Preferences
      PATCH
    • Create Password Recovery
      POST
    • Complete Password Recovery
      PUT
    • Delete All Account Sessions
      DELETE
    • Get Account Sessions
      GET
    • Create Account Session
      POST
    • Create Anonymous Session
      POST
    • Create Account Session with OAuth2
      GET
    • Delete Account Session
      DELETE
    • Get Session By ID
      GET
    • Create Email Verification
      POST
    • Complete Email Verification
      PUT
  • avatars
    • Get Browser Icon
    • Get Credit Card Icon
    • Get Favicon
    • Get Country Flag
    • Get Image from URL
    • Get User Initials
    • Get QR Code
  • database
    • List Documents
    • Create Document
    • Delete Document
    • Get Document
    • Update Document
  • functions
    • List Executions
    • Create Execution
    • Get Execution
  • locale
    • Get User Locale
      GET
    • List Continents
      GET
    • List Countries
      GET
    • List EU Countries
      GET
    • List Countries Phone Codes
      GET
    • List Currencies
      GET
    • List Languages
      GET
  • storage
    • List Files
    • Create File
    • Delete File
    • Get File
    • Update File
    • Get File for Download
    • Get File Preview
    • Get File for View
  • teams
    • List Teams
    • Create Team
    • Delete Team
    • Get Team
    • Update Team
    • Get Team Memberships
    • Create Team Membership
    • Delete Team Membership
    • Update Membership Roles
    • Update Team Membership Status
  1. locale

Get User Locale

GET
/locale
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)
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://appwrite.io/v1/locale'
Response Response Example
{
    "continent": "string",
    "continentCode": "string",
    "country": "string",
    "countryCode": "string",
    "currency": "string",
    "eu": true,
    "ip": "string"
}

Request

None

Responses

🟢200Locale
application/json
Body
Locale
continent
string 
required
Continent name. This field support localization.
continentCode
string 
required
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.
country
string 
required
Country name. This field support localization.
countryCode
string 
required
Country code in ISO 3166-1 two-character format
currency
string 
required
Currency code in ISO 4217-1 three-character format
eu
boolean 
required
True if country is part of the Europian Union.
ip
string 
required
User IP address.
Modified at 2023-08-16 07:28:13
Previous
Get Execution
Next
List Continents
Built with