API V2 Documentation - AbracadaRoom

Internationalization of responses

The API endpoints can send back some data with an internationalized value. An internationalized value is an object containing as many localization keys as there are languages in the system, and including, for each language, the data value in that language.

The localization keys use the lang:[CODE] format, where [CODE] is replaced by the localization code of the language.

The localization keys used as of today are:

  • fr: French
  • en: English
  • nl: Dutch
  • es: Spanish

Example (here, label is an internationalized data):

"label":{
  "lang:fr": "Cabane dans les arbres",
  "lang:en": "Treehouse",
  "lang:es": "Cabaña en los árboles",
  "lang:nl": "Boomhut"
}
In AbracadaRoom, the default language is French. Thus, for example, if a value hasn't been translated in Spanish, the endpoint will provide the French version on the lang:es key.

On each endpoint, it is possible to pass a lang parameter, with one of the localization keys as value. In that case, the internationalized value will not be an object containing all the values for each language, but only the value in the requested language.

Example (for a call with ?lang=fr:

"label": "Cabane dans les arbres"