Language Codes
Characteristic
Short description
Language codes specify which language is used if a text or description is available in more than one language.
Use
Language codes in the profile are used to specify a preferred language for strings returned by API calls.
The mapLanguage influences in which language geographic names that are part of the map are returned e.g. by the xLocate service.
The userLanguage influences in which language texts like maneuver or traffic-incident descriptions are returned e.g. by the xRoute/xMap services.
Detailed Consideration
We use codes according to the BCP 47 standard track defined by the Internet Engineering Task Force (IETF).
This standard allows to use two-letter ISO 639-1 codes, specify regional an transliterated languages and also define private-use codes.
ISO 639-1 Codes
For most cases, we use ISO 639-1 codes to specify languages.
Examples:
de
specifies German.en
specifies English.fr
specifies French.it
specifies Italian.
Region, Script and Transformation Subtags
For cases where ISO 639-1 is not sufficient, the BCP 47 standard allows the use of region, script and transformation subtags.
Examples:
en-US
specifies English, as spoken in the United States (region subtag).pt-BR
specifies Portugese, a spoken in Brazil (region subtag).az-Latn
specifies Azerbaijani language, written in a latin alphabet (script subtag).und-Latn-t-el
specifies Greek transliterated to latin alphabet (transformation subtag).und-Latn-t-ru
specifies Russian transliterated to latin alphabet (transformation subtag).
Private-use Tags
For cases where ISO 639-1 and these subtags are still not sufficient, the BCP 47 standard allows defining tags for private use.
There are two private-use tags used in xServer:
-
x-ptv-DFT
which basically means 'use the default'. -
x-ptv-Latn-DFT
which means 'use the default but in a latin alphabet'.
Whether it is allowed, and how it is handled depends on the API-function being called.
Examples:
- In xLocate, passing a mapLanguage of
x-ptv-DFT
will return each result in a language most commonly used in that country or region, whilex-ptv-Latn-DFT
will do the same but in a latin alphabet. - For the userLanguage,
x-ptv-DFT
andx-ptv-Latn-DFT
are not allowed.
Good to know
Language availability for geographic names depends on data
It depends on the data whether or not texts are available in the requested language. If the requested language is not available for that item, the default text will be used. The default text is in the language that is most commonly used in that country or region. This is the same text that you get when specifying the x-ptv-DFT language code.
Related Topics
Technical Concept | Geocoding:
Result strings will be returned in the language given in the request profile![]() |