Template:Table langcodes

This is a table of language codes and names of languages in English and {{{1}}} ({{{1}}}). The names are from:

  • the Wikidata item label
  • the Wikipedia article
  • the name from Mediawiki (or the Wikidata interface: the name before label and description in the termbox).

Further, the table includes the languages' autonyms (not directly used in Wikidata). Frequency of labels comes from User:Mr. Ibrahem/Language statistics for items, frequency of monolingual strings from phab:T180771#7171896, lexemes from https://w.wiki/3dgC .

Entries can be linked with anchors, e.g. #mis or #Q1815020.

FIXME

Sometimes a fallback is shown instead of the language name. This can be English or the language code.

  • Wikidata item labels: These can be added or updated by clicking on the cell. When missing, the cell is colored.
  • MediaWiki names: If English equals {{{1}}}, this is colored. It can be correct or the fallback, meaning {{{1}}} is missing. An update can be requested at Wikidata:Contact_the_development_team.
  • If the code appears, it's possible that the language isn't (fully) set up. These table cells are grey. Updates would need to be requested. It also happens when several codes are available. These can be fully set up already.

On how to make more codes available for Wikidata, see Help:Monolingual_text_languages and phab:project/profile/4981/.


Documentation icon Template documentation[view · edit · history · purge ]

Various templates used to generate a table of language names and codes with Listeria.

Introduction to table:

The table header and row templates used by {{Wikidata list}}:

Statistics are stored in:

Lists using these:

Usage edit

Sample usage, with "fr" for French

{{Table langcodes|fr}}
{{Wikidata list
|sparql=
SELECT
  ?item 
  ?c (CONTAINS(?c,"-") as ?subtag)
  ?wdlabelen
  (CONCAT("[[:en:",?enwikipeda,"\u007C",?enwikipeda,"]]") as ?wikipedia_link_en)
  ?lang
  ?wdlabelinlang
  (CONCAT("[[:",?lang,":",?wikipeda,"\u007C",?wikipeda,"]]") as ?wikipedia_link)
WHERE
{
  VALUES ?lang { "fr" }
  ?item wdt:P424 ?c .
  hint:Prior hint:rangeSafe true .
  MINUS{?item wdt:P31 wd:Q47495990}
  MINUS{?item wdt:P31/wdt:P279* wd:Q14827288} #exclude Wikimedia projects
  MINUS{?item wdt:P31/wdt:P279* wd:Q17442446} #exclude Wikimedia internal stuff
  OPTIONAL { ?item rdfs:label ?wdlabelinlang . FILTER( lang(?wdlabelinlang)= "fr" ) }
  OPTIONAL { ?item rdfs:label ?wdlabelen . FILTER(lang(?wdlabelen)="en") }
  OPTIONAL { [] schema:about ?item ; schema:inLanguage ?lang; schema:isPartOf / wikibase:wikiGroup "wikipedia" ; schema:name ?wikipeda } 
  OPTIONAL { [] schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> ; schema:name ?enwikipeda } 
}
ORDER BY ?c
|short=true
|columns=?c,?subtag,QID,P1705,P305,P31,P279,?wdlabelen,?wikipedia_link_en,?lang,?wdlabelinlang,?wikipedia_link
|row_template=tr_langcodes
|header_template=th_langcodes
}}
{{Wikidata list end}}

See also edit