Help:Special property "Has preferred property label"
|Has preferred property label|
|Adds localizable labels to a property|
|Provided by:||Semantic MediaWiki|
|Removed:||still in use|
|Alias:||Preferred property label|
|In this wiki:||Property:Has preferred property label|
The Has preferred property label property is a special property in Semantic MediaWiki with a built-in meaning: it adds the possibility to localize the label of a property. It was introduced starting with Semantic MediaWiki 18.104.22.168
With the introduction of the "Monolingual text" datatype, Semantic MediaWiki is able to provide a method to denote a text element of arbitrary length with a language tag thus allowing it to distinguish such text by the same attribute.
Adding preferred labels to a property specification is aimed at increasing the likelihood for a user to understand the concept of a particular property by defining a label in a language (as side from the canonical label) a user is most familiar with.
Features and limitations
- Borrowing on the "skos:prefLabel"2 definition, the preferred label is understood as to only have one label per given language (while "skos:altLabel"3 can have many alternative labels but this is not part this issue)
- To separate a canonical label from a preferred label during the output, a small p hint will be shown along with the label
- The preferred label feature is aimed for the output and not for the annotation process, meaning that a reverse matching during an annotation process is not supported (
[[人口@ja::123]], annotations are expected to use the canonical identifier or label)
- The user language is being used as selective attribute that will trigger a change of labels, if available
- Can easily be combined with the property link feature4 (
[[SomeProperty::@@@en]]) to create local-specific infoboxes.
On the "Has population" property page in namespace "Property" one would add the following to define preferred property labels for the the languages specified language French (fr), German (de), Japanese (ja) and Spanisch (es):
* [[Has preferred property label::population@fr]] * [[Has preferred property label::Bevölkerung@de]] * [[Has preferred property label::人口@ja]] * [[Has preferred property label::población@es]]
- Other examples
- The propery "Has population" page on <sandbox.semantic-mediawiki.org>
- The "Berlin" page on <sandbox.semantic-mediawiki.org>
- Info page on Multilingual Semantic MediaWiki
- Help page on localization and multilingual content
- Help page on content, page and user language
- Help page on the "Semantic Interlanguage Links" extension that links content of different languages together and automatically set the page content language as preferred content language
- Help page on datatype "Monolingual text"
- Help page on special property "Has property description"
- Help page on special property "Language code"
- Semantic MediaWiki: GitHub issue gh:smw:1865
- skos:prefLabel is described as "preferred lexical label for a resource, in a given language" and skos-primer notes further that "... it is recommended that no two concepts in the same KOS be given the same preferred lexical label for any given language tag ...", Retrieved from: https://www.w3.org/TR/skos-primer/#secpref
- At the time of this writing, skos:altLabel or alternative labels (different labels for the same language) are not supported.
- Semantic MediaWiki: GitHub issue #1855