$smwgEntityCollation

From Linux Web Expert


Template:Interlanguagelink: en
Configuration parameter details:
Name $smwgEntityCollation
Description Property "Has description" (as page type) with input value "Sets which collation entities in Semantic MediaWiki should [[Help:Sorting|sort with" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
Default setting Has default::identity
Software Semantic MediaWiki
Since version
Until version still available
Configuration Installation
Keyword collation · sorting


__NOBREADCRUMBLINKS__

$smwgEntityCollation is a configuration parameter that sets the collation entities with which Semantic MediaWiki should sort. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki.1

The setting to this configuration parameter is "global" and applies to any entity that is maintained for a wiki. In being global means that it cannot be selective (use one collation for one query and use another collation for a different query) because the field ("smw_sort") contains a computed representation of the sort value.

Default setting

$smwgEntityCollation = 'identity';

This means that by default it uses the collation defined by configuration parameter $wgCategoryCollation (MediaWiki.org) for sorting and will produce the same sorting results as without the presence of this configuration parameter, i.e. releases prior to Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki.

Available options

All collation options as provided by configuration parameter $wgCategoryCollation (MediaWiki.org) are supported:

  • uppercase − make everything uppercase, then sort by binary value of string when stored as UTF-8. Essentially case-insensitive sort by code point
  • numeric − same as uppercase, but with numeric sorting (since MediaWiki 1.28.0)
  • identity − sort by binary value of string when stored as UTF-8 without converting to uppercase. Essentially sort by code point (since MediaWiki 1.18.0)
  • uca-default − Unicode collation algorithm. This is a complex and much more multilingual-friendly category collation (since MediaWiki 1.17.0)
  • uca-default-u-kn − same as uca-default with numeric sorting (since MediaWiki 1.28.0)
  • uca-<langcode> − same as uca-default with language-specific adjustments (since MediaWiki 1.21.0)
  • uca-<langcode>-u-kn − same as uca-<langcode> with numeric sorting. (since MediaWiki 1.28.0)

See the list of available language codes (<langcode>) on MediaWiki.org for further information.

Changing the default setting

→ The setting of this configuration parameter should correspond to the setting of configuration parameter $wgCategoryCollation (MediaWiki.org) also in regards to selected argument values, yet it is kept separate to have a better control over changes in regards to the collation, sorting, and display of values.

Maintenance script "updateEntityCollation.php"No description was provided. has to be run after changing the stetting of this configuration parameter.

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Switch to Standard German of Germany with numeric sorting as sorting collation
$smwgEntityCollation = 'uca-de-u-kn';

This means that Semantic MediaWiki itself will now use Standard German of Germany with numeric sorting as sorting collation.

See also

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

References

  1. ^ gh:smw:2429