Description
There is two ways to pass translations to the REST API.
Before, there was Value:
<names> <value languageCode="eng-GB">Custom State</value> </names>
"names": { "value": [ { "_languageCode": "eng-GB", "#text": "Custom State" } ] },
Examples in context: ObjectStateGroup XML & JSON
Now, there is also an other syntax:
<names> <eng-GB>Bank transfer (updated)</eng-GB> </names>
"names": { "eng-GB": "Bank transfer (updated)" }
Examples in context: PaymentMethodUpdateStruct XML & JSON
I see two problems:
- Inconsistency: a developer has to learn 2 syntaxes, and has to check which syntax is accepted by the names, descriptions or other translatable property currently used.
- XML schema: with the newer syntax, there can't be a proper XML schema if tag names are unpredictables.