LinguaLibre

Difference between revisions of "Speakers"

(Marked this version for translation)
 
(35 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DataViz
+
<languages/>
| query = select ?record ?recordLabel ?locutorLabel ?languageLabel ?languageLevelLabel
+
{| style="width:100%"
            where {
+
|- style="vertical-align:top;padding:.5em;"
              ?record prop:P2 entity:Q2 .
+
| style="padding-right:.5em;"|
              ?record prop:P5 ?locutor .
+
<query _pagination="50" locutor="<translate><!--T:4--> item</translate>" locutorLabel="<translate><!--T:5--> Speaker username</translate>" place="<translate><!--T:6--> Place of residence</translate>">
              ?record prop:P4 ?language .
+
    PREFIX wd: <http://www.wikidata.org/entity/>
 +
    PREFIX wdt: <http://www.wikidata.org/prop/direct/>
 +
    select distinct ?locutor ?locutorLabel ?place
 +
    where {
 +
        ?locutor prop:P2 entity:Q3 .
 +
        #extra:{"type": "wikibase-item", "filter":"Q4", "label": "P4", "multiple": true} ?locutor prop:P4 entity:[EXTRA] .
 +
          ?locutor prop:P14 ?location .
 +
          BIND(uri(concat("http://www.wikidata.org/entity/", IF( isBLANK(?location), 'Q2', ?location ))) as ?locationItem).
 +
 
 +
          SERVICE <https://query.wikidata.org/sparql> {
 +
            #extra:{"type":"wikidata", "label":"P14"} ?locationItem wdt:P131*/wdt:P131? wd:[EXTRA] .
 +
            ?locationItem rdfs:label ?place .
 +
            FILTER (LANG(?place) = "[AUTO_LANGUAGE]") .
 +
          } 
 +
          SERVICE wikibase:label {
 +
            bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
        }
 +
    }
 +
</query>
 +
|
  
              ?locutor llp:P4 ?languageStatement .
+
<query _pagination="100" languages="<translate><!--T:7--> Number of speakers</translate>" records="<translate><!--T:8--> Number of records</translate>">
              ?languageStatement llv:P4 ?language .
+
select (COUNT(DISTINCT ?speaker) as ?speakers)
              ?languageStatement llq:P13 ?languageLevel .
+
where {
 +
  ?speaker prop:P2 entity:Q3 .
 +
}
 +
</query>
 +
|}
  
              SERVICE wikibase:label {
+
[[Category:Lingua Libre:DataViz{{#translation:}}]]
                bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,en" .
 
              }
 
 
 
            } ORDER BY ?languageLabel ?languageLevelLabel
 
}}
 

Latest revision as of 23:39, 13 January 2022

Other languages:
Bahasa Melayu • ‎Canadian English • ‎Deutsch • ‎English • ‎Esperanto • ‎Taqbaylit • ‎brezhoneg • ‎español • ‎français • ‎norsk bokmål • ‎occitan • ‎polski • ‎svenska • ‎македонски • ‎বাংলা • ‎日本語
... Loading ...
... Loading ...