#ask: syntax – "lang" printout language filter

From Linux Web Expert

#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:homepageURL of the homepage of something, which is a general web resource.
foaf:knowsA person known by this person (indicating some level of reciprocated interaction between the parties).
foaf:nameA name for some thing or agent.
owl:differentFromThe 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

#scite could not render a citation text for reference "gh:smw:2037" because type "pullrequest" was not assigned to a template.