Some DragonPass APIs provide multiple languages support. To deliver a better user experience, you may specify your preferred response language in the request.Access to the additional languages API requires prior authorization. Please contact DragonPass to request access.
APIs with Multiple Language Support#
| Endpoints | Multiple Language | Fallback |
|---|
/v2/transportHubs | ✅️ | - |
/v2/transportHubs/{transportHubId} | ✅️ | ✅️ |
/v2/resources | ✅️ | - |
/v2/resources/{resourceId} | ✅️ | ✅️ |
Supported Language Codes#
You can use the following language codes to request multiple language data from the API.| Language | Code |
|---|
| English | en-US |
| French | fr-FR |
| German | de-DE |
| Italian | it-IT |
| Japanese | ja-JP |
| Polish | pl-PL |
| Portuguese | pt-PT |
| Portuguese(Brazilian) | pt-BR |
| Russian | ru-RU |
| Spanish | es-ES |
| Thai | th-TH |
| Ukrainian | uk-UA |
| Vietnamese | vi-VN |
| Simplified Chinese | zh-CN |
| Traditional Chinese | zh-HK |
Some data may not yet have translations available in all languages.
You can use the fallbackAllowed parameter to control whether English (en-US) should be used as a fallback when the requested language is unavailable.
Fallback Mechanism#
DragonPass API adopts a two-layer fallback mechanism:1. Language Support Layer#
Some languages are not supported at all by DragonPass.
For these languages, please request en-US directly.2. API Fallback Mechanism Layer#
For languages that are supported by DragonPass, the API applies the following fallback rules based on the fallbackAllowed parameter.If the resource has no translation in the requested language on DragonPass, the API will not return the resource data.
If the resource has translation in the requested language, the API will return the resource data, with translated fields in the requested language and untranslated fields in English.
If the resource has no translation in the requested language on DragonPass, the API will return the resource data entirely in English.
If the resource has translation in the requested language, the API will return the resource data, with translated fields in the requested language and untranslated fields in English.