MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:-{R|https://www.mediawiki.org/wiki/API:Main_page/zh}-

meta=languageinfo (li)

main | query | languageinfo

Return information about available languages.

Continuation may be applied if retrieving the information takes too long for one request.

参数:
liprop

Which information to get for each language.

code
The language code. (This code is MediaWiki-specific, though there are overlaps with other standards.)
bcp47
The BCP-47 language code.
dir
The writing direction of the language (either ltr or rtl).
autonym
The autonym of the language, that is, the name in that language.
name
The name of the language in the language specified by the uselang parameter, with language fallbacks applied if necessary.
fallbacks
The language codes of the fallback languages configured for this language. The implicit final fallback to 'en' is not included (but some languages may fall back to 'en' explicitly).
variants
The language codes of the variants supported by this language.
值(以|替代物分隔):autonym、bcp47、code、dir、fallbacks、name、variants
Default: code
licode

Language codes of the languages that should be returned, or * for all languages.

通过|替代物隔开各值。
Maximum number of values is 50 (500 for clients allowed higher limits).
Default: *
licontinue

当更多结果可用时,使用这个继续。

例子:
Get the language codes of all supported languages.
api.php?action=query&meta=languageinfo [在沙盒中打开]
Get the autonyms and German names of all supported languages.
api.php?action=query&meta=languageinfo&liprop=autonym|name&uselang=de [在沙盒中打开]
Get the fallback languages and variants of Occitan.
api.php?action=query&meta=languageinfo&liprop=fallbacks|variants&licode=oc [在沙盒中打开]
Get the BCP-47 language code and direction of all supported languages.
api.php?action=query&meta=languageinfo&liprop=bcp47|dir [在沙盒中打开]