The serializer needs to be able to represent language fallback - that is, they key used for a label or description term can be different from the actual language of the term. For example, consider https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&languages=ii&format=json&languagefallback: The requested language is ii, but since there is no label known in ii, but a language fallback from zh-cn to ii is defined, we get back the zh-cn label for the ii key:
"labels":{
"ii":{
"language":"zh-cn",
"value":"\u9053\u683c\u62c9\u65af\u00b7\u4e9a\u5f53\u65af"
}
}We will need to support at least this behavior, either in the serializer or in the model.
Note: According to bug 72038, "ii" should also be present in a separate field called "for-language". And that in cases where translitteration is involved, there may be a third language (the original language) involved.
Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0 s=2014-11-11
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=73308
https://bugzilla.wikimedia.org/show_bug.cgi?id=72038