LinguaLibre
Difference between revisions of "Stats/Languages"
< LinguaLibre:Stats
WikiLucas00 (talk | contribs) (Marked this version for translation) |
m (get language label in other language than English) |
||
Line 22: | Line 22: | ||
<query _pagination="10" lang="<translate> <!--T:7--> Item (Language Qid)</translate>" langLabel="<translate> <!--T:8--> Language</translate>" code="<translate> <!--T:9--> ISO 639-3 code</translate>" nb="<translate> <!--T:10--> Number of records</translate>"> | <query _pagination="10" lang="<translate> <!--T:7--> Item (Language Qid)</translate>" langLabel="<translate> <!--T:8--> Language</translate>" code="<translate> <!--T:9--> ISO 639-3 code</translate>" nb="<translate> <!--T:10--> Number of records</translate>"> | ||
SELECT ?lang ?langLabel ?code ( count(DISTINCT ?record) as ?nb ) WHERE { | SELECT ?lang ?langLabel ?code ( count(DISTINCT ?record) as ?nb ) WHERE { | ||
− | ?lang prop:P2 entity:Q4 ; rdfs:label ?langLabel . FILTER (lang(?langLabel) = "en"). | + | ?lang prop:P2 entity:Q4 ; rdfs:label ?langLabel . FILTER (lang(?langLabel) = "[AUTO_LANGUAGE],en"). |
OPTIONAL { ?record prop:P4 ?lang ; prop:P2 entity:Q2 . } | OPTIONAL { ?record prop:P4 ?lang ; prop:P2 entity:Q2 . } | ||
OPTIONAL { ?lang prop:P13 ?code } | OPTIONAL { ?lang prop:P13 ?code } | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | ?lang rdfs:label ?langLabel . | ||
+ | } | ||
} | } | ||
GROUP BY ?lang ?langLabel ?code | GROUP BY ?lang ?langLabel ?code |