Tech Blog

Alma APIs Multilingual Support

Alma API’s response objects distinguish between data represented by codes, and textual description.

Aside from a few exceptions, the code will be the value of a field, and the description will be included in an attribute called “desc”.
For example:

<material_type desc="Music Score">SCORE</material_type>

When updating an object’s field in Alma using PUT or POST, the “desc” attribute is ignored and only the code is taken into account. This separation allows support of multilingual interfaces which are based on the APIs.

In order to retrieve output in a specific language include the “lang” parameter with the 2 letters code of the required language. For example, to retrieve information for users in French use: GET …/users?lang=fr

You can include the lang parameter also for PUT or POST requests but this will have no effect on the data written to Alma (since the desc attribute will be ignored). However, since the POST and PUT responses include the created (or modified) object, the output will have the desc attributes in the language sent in the parameter.

Besides code tables, many other objects in Alma support customized translation. Some examples of such objects are: Library and location names and addresses, circulation-desk name, course name and description, fulfillment policy description and more. The translated values for all of these elements will also be retrieved according to the specific “lang” code specified.

Alma’s out-of-the-box messages are translated with only a few exceptions, such as technical error messages. If you spot something in English which you think should be translated please open a Support case.

For those of you who prefer to try out APIs using our built-in API Console instead of a stand alone API console (such as Postman or Advanced REST Client) and would like to use the lang parameter, click on the “Add Parameter” button and then choose “Query” in the “Parameter Type”

Leave a Reply