Query Translation

Translate a term to different languages and return a query string to use in the search API method. Right now this functionality is a wrapper around a Wikipedia API call.

Request

ParameterDatatypeDescription
wskeyStringYour API key
languageCodesStringThe ISO language codes separated by commas or spaces
termStringThe term to translate

Response

NameDatatypeDescription
translationsArrayA list of translations. Each translation contains two fields:
text: the text of the translation
languageCode: the ISO language code of the translation
translatedQueryStringA query string where each translations are concatenated by the boolean OR operator.

Example

Get the translations of Notre Dame

https://europeana.eu/api/v2/translateQuery.json?languageCodes=nl,en,hu&wskey=xxxxxxxx&term=notre%20dame

It returns

{
"apikey": "xxxxxxxx",
"action": "translateQuery.json",
"success": true,
"requestNumber": 8957,
"translations": [
{
"text": "Notre-Dame",
"languageCode": "nl"
},
{
"text": "Notre Dame",
"languageCode": "en"
},
{
"text": "Notre Dame",
"languageCode": "de"
}
],
"translatedQuery": "Notre-Dame OR \"Notre Dame\""
}

For background information see the blog post Improving search across languages