Status: | effective |
Progress: | 100% |
Version: | 2.5.0+ |
#ask:
syntax – "lang" printout language filter
#ask: syntax details:
| |
Syntax | +lang= |
Description | Property "Has description" (as page type) with input value "Allows to filter a language specific printout[[CiteRef::gh:smw:2037" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. |
Datatype support | Datatype "Monolingual text "Holds a text value that associates the annotation with a specific language code |
Component | printout |
Software | Semantic MediaWiki |
Since version | Semantic MediaWiki 2.5.0 Released on an unknown date unknown versions of MediaWiki |
Keyword | language filter |
The +lang=
printout language filter was introduced in Semantic MediaWiki 2.5.0Released on an unknown date unknown versions of MediaWiki.
Rationale
It allows to filter results that match a specific language for printout statements using the +lang=
query parameter. The filtering is only applied to properties of datatype "Monolingual text"Holds a text value that associates the annotation with a specific language code.
It is applied during query post-processing after the condition has already retrieved matchable entities. The printout and hereby the data values may match text in different languages and unless the query condition was designed in a way that would made them reducible, it would display them all. Thus a query condition can be indifferent towards possible language matches, yet enables to only select the one that match the denoted language value. See the help page on datatype "Monolingual text"Holds a text value that associates the annotation with a specific language code for examples to limit the query condition to only select results for specific language.
Examples
- Syntax
{{#ask: [[Has property description::+]] |?Has property description|+lang=en }}
- Result
Property description"Property description" is a predefined property that allows to describe a property in context of a language and is provided by Semantic MediaWiki. | |
---|---|
foaf:homepage | URL of the homepage of something, which is a general web resource. |
foaf:knows | A person known by this person (indicating some level of reciprocated interaction between the parties). |
foaf:name | A name for some thing or agent. |
owl:differentFrom | The property that determines that two given individuals are different. |
or only show German translations if available:
- Syntax
{{#ask: [[Has property description::+]] |?Has property description|+lang=de }}
- Result
Property description"Property description" is a predefined property that allows to describe a property in context of a language and is provided by Semantic MediaWiki. | |
---|---|
foaf:homepage | |
foaf:knows | |
foaf:name | |
owl:differentFrom |
- Link
<sandbox.semantic-mediawiki.org>: More examples for this query parameter
See also
- Help page on datatype "Monolingual text"Holds a text value that associates the annotation with a specific language code
- Help page on special property "Language code"Handles BCP47 conform language codes specifying the language of the annotated text
- Help page on special property "Has property description"Adds localizable context help to properties