Help:Datatype "Monolingual text"

Jump to: navigation, search
Monolingual text
Holds a text value that associates the annotation with a specific language code
Further Information
Provided by: Semantic MediaWiki
Added in version: 2.4.0
Removed in version: still in use
Datatype ID:
In this wiki: Monolingual text
Table of Contents

The datatype Monolingual text1 associates a text value with a specific language code. The annotation form is expected as foo@en with the first element being an arbitrary text while the second element divided by @ to contain a valid language code.


  • Internally each MonolingualTextValue is stored as separate entity using the ContainerSemanticData construct allowing for `foo@en` to be different from `foo@ja` by its data structure (oppose to a string comparison which only would establish that two strings are different but without the semantic interpretation that for the cited example only the language code is different).
  • [[Has monolingual text::some text@en]] is identical to [[Has monolingual text::some text@EN]] because language codes are transformed to a IETF language tag / BCP47 (Localizer::asBCP47FormattedLanguageCode).
  • The Language code is internally managed by the "Language code" special property


[[Has monolingual text::foo@ja]]

 |Has monolingual text=foo@en
 [[Has monolingual text::?@ja]]
 |?Has monolingual text|+index=1

Display text in context of a language:

 |@category=Test one
 |Has monolingual text=123@en
 |@category=Test one
 |Has monolingual text=一二三@ja
 [[Category:Test one]]
 [[Has monolingual text::?@{{USERLANG}}]]
 |?Has monolingual text|+index=1

See <> for live examples.

Related query syntax elements


Help pageSyntax elementDescription
#ask: annotation query marker
Marks an inline query as part of an annotation2
#ask: control query marker
Allows to dynamically alter a result display without the need to reload a page3
#ask: deferred query marker
Marks an inline query as deferred from regular parsing3
#ask: hierarchy depth restriction
Restricts the hierarchy depth of a query4
#ask: printout column alignment
Defines an alignment for the content of a printout column
#ask: printout column width
Defines a width for a printout column5
#ask: printout sorting order
Defines the sorting order for printout statements (dot chain syntax)6

See also


  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:1344
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:2572
  3. a b  Semantic MediaWiki: GitHub pull request gh:smw:2398 (Add support for @deferred mode)
  4. ^  Semantic MediaWiki: GitHub issue gh:smw:2662
  5. ^  Semantic MediaWiki: GitHub pull request gh:smw:2677
  6. ^  Semantic MediaWiki: GitHub pull request gh:smw:2073