Multilingual Support in DDI Central API

DDI Central API supports multiple languages, allowing users to receive API responses in their preferred language by specifying the Accept-Language header in API requests.

How to set the language?

To set the API language, include the Accept-Language parameter in the request headers. The value should follow ISO 639-1 language codes, which are internationally accepted two-letter language identifiers.


For example, to receive responses in Japanese, include the following header in your API request:

headers= { "Accept-Language": "ja" }

This ensures that the API responses are returned in the specified language, improving localization and user experience.

Example usage in API requests

When making an API request, add the Accept-Language header with the desired language code.

As highlighted in the image above, "ja" (Japanese) is set as the language preference. Therefore, the API will return responses in Japanese if localization is supported.

Supported Language Codes

DDI Central follows ISO 639-1 language codes (Alpha-2 format) covering the registration of "set 1" two-letter codes. Some commonly used codes include:

LanguageCode
Englishen
Japaneseja
Frenchfr
Spanishes
Germande
Chinesezh
Arabicar

Note: If the requested language is not available, the response will default to English (en).

API Response Example

If a request is sent with Accept-Language: ja, the response will be localized as shown in the above screenshot:

(Translation: "The zone has not been added.")

Why use Accept-Language?

  • Enables localized responses for a global user base.
  • Improves usability by providing messages in the user's native language.
  • Helps in error troubleshooting with clear and understandable API feedback.

By leveraging this feature, users can seamlessly interact with the API in their preferred language, enhancing accessibility and usability in diverse environments.