Skip to content
Gurdx

Docs / Options

Localization

Use the lang parameter to receive translated fields in your users' language.

The lang parameter#

curl "https://gurdx.cretip.com/api/geoip?key=YOUR_API_KEY&lang=AR"

The value is case-insensitive and defaults to EN. Supported languages:

langLanguage
ENEnglish
ARArabic
FRFrench
DEGerman
ESSpanish
JAJapanese
ZHChinese
RURussian

An unsupported value returns error 110 invalid_language.

What is translated#

Only descriptive fields are translated, for example country names and other human-readable labels. Codes, numbers, booleans, IP addresses and field names stay the same in every language, so you can keep parsing responses with one code path.

Translation depends on the method and the data source. When a translation is not available for a value, Gurdx returns the English text rather than leaving the field empty.

Example#

curl "https://gurdx.cretip.com/api/lookup/country?key=YOUR_API_KEY&countryCode=DE&lang=FR"
{
  "data": {
    "countryCode": "DE",
    "countryName": "Allemagne"
  },
  "status": "success",
  "executionTime": 5
}

Error messages#

The description of an API error stays in English regardless of lang. Branch on code and type and show your own localized message to end users. See Error codes.

Combining with other options#

curl "https://gurdx.cretip.com/api/geoip?key=YOUR_API_KEY&lang=JA&params=location,timezone"

Tip: If you serve several markets, pass the language of the visitor's interface rather than their IP country. A Saudi visitor browsing in English probably wants EN.

Found a mistake? Tell us on the contact page. Contact