+

Search Tips | Advanced Search

REST API national language support

The REST API supports, with certain qualifications, the ability to specify national languages as part of an HTTP request.


Background

HTTP headers allow particular behavior to be specified on requests and additional information to be provided in responses.

Included in the HTTP headers is the ability to request that information is returned in a national language. The REST API honors this header where possible.


Specifying a national language

In the ACCEPT-LANGUAGE HTTP header, one or more language tags can be supplied. We can optionally associate a rank with the tags, allowing for the specification of a list ordered by preference. This page has a helpful discussion of the principle.

The REST API honors this header, selecting a language from the ACCEPT-LANGUAGE header and returning messages in that language. When the ACCEPT-LANGUAGE header contains no language that the REST API can support, messages are returned in a default language. This default language corresponds to the default locale of the REST API web server.

The What data is translated? section explains what data is translated.


Indicating the applicable language on responses

The CONTENT-LANGUAGE HTTP header on responses from the REST API indicates the language in which the messages are returned.


What data is translated?

Error and informational messages are translated, other text is not.


What languages are supported?

In addition to English, REST API error and informational messages are translated into the following languages.


Examples

In the examples, the web server has an English default locale.