javascript - how to change language of retrieved content using language api in wikipedia? -
i want 2 api call 1 content , other 1 language change.
some experimentation shows getting content links 1 or more page titles, , specifying required language content part of same api query. specific language can requested providing lllang
parameter in query string suitable language code value.
for example url of page title "albert einstein" translated egyptian arabic (code "arz") in api's sandbox:
https://en.wikipedia.org/wiki/special:apisandbox#action=query&format=json&prop=langlinks&titles=albert+einstein&llprop=url&lllang=arz
depending on application , query volumes, can improve efficiency request data multiple titles and/or languages in 1 call , search through results, opposed making many separate, individual calls.
fwiw. api documentation seems lack instructions provide specific parameters "langlinks` or other query types adding them key-value pairs query string.
Comments
Post a Comment