How to determine language of Wiki page?


I’m investigating Wiki API and I do not see how to determine language of the Page. There is prop=langlinks for action=query but it does not work. For example this command for Alminav does not return entries for English and German.



And it is not exactly what I need.

Another question is it possible to return timestamp of last modification of the page in the “list=embeddedin” request? Looks like standard Wiki API does not support it. Can you extend this API?


The langlinks query returns links to pages on separate wikis in other languages that are displayed in the left-hand bar, organised like Wikipedia. It is no use for links that are displayed in the body of the page when all of the languages are in the same wiki. Sometimes you can deduce the language of a page from the namespace, for instance pages in the DE: namespace are in German. The {{langcode}} template uses more detailed heuristics to determine the language of a page.

Hi Wynndale. Thank you for reply. Looks like the only way is to parse language from Page namespace (e.g. DE:Alminav). No one uses {{langcode}}…