Multilingual strings

The properties of the multilingual string type are always returned using the lang attribute to specify the language used by the string. The lang attribute is translated to @aras.lang annotation for this property:

GET http://host/server/odata/ItemType(‘4F1A…8A88’)?$select=label

Response:

{

"@odata.context": “http://host/server/odata/$metadata#ItemType(label)/$entity”,

“id": “4F1A…8A88",

“label": “Part”,

“label@aras.lang": “en”

}

The client can also ask for the property value specifying a language other than the language being used in the session or in all the languages defined in the database. In AML the language attribute serves this purpose. It may contain a comma-separated list of languages or star “*” specifying all the languages in the database. The OData service introduces the lang query option with the same meaning and #aras.lang.* annotation qualifier that is used to return the property or property attribute value in the requested languages:

GET http://host/server/odata/ItemType(‘4F1A…8A88’)?$select=label&lang=*

Response:

{

"@odata.context": “http://host/server/odata/$metadata#ItemType(label)/$entity”,

“id": “4F1A…8A88",

“label": “Part”,

“label@aras.lang": “en”,

“label@aras.custom_attr": “PPP”,

“label@#aras.lang.ru": “Деталь”

“label@aras.custom_attr#aras.lang.ru": “ДДД”

}