How to determine language of Wiki page?

Hi

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.


http://wiki.openstreetmap.org/w/api.php?action=query&prop=langlinks&format=json&titles=DE:Alminav

Returns


{"batchcomplete":"","query":{"pages":{"140215":{"pageid":140215,"ns":200,"title":"DE:Alminav"}}}}

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?

Thanks
Dima

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}}…