On Wed, Jan 25, 2017 at 2:09 AM, <b...@yahoo-inc.com> wrote: > While I was developing some services based on API:Opensearch, I found that > the response of the same url request can be either Simplified Chinese or > Traditional Chinese. To be more specific, I would love to know how can I > determine the response language form from API layer ( Or other factors that > may have impact ) ? Since the document of API:Opensearch doesn't seem to > take language into consideration, >
The OpenSearch Suggestions extension specification[1] does not allow for returning additional metadata such as language with the response. You may want to look at the prefixsearch query module[2] instead which allows for returning the same results in a different format, although I don't know the details of how language variants are handled in the search output. [1]: http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.1 [2]: https://www.mediawiki.org/wiki/API:Prefixsearch -- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation
_______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api