$smwgEntityCollation
Configuration parameter details: | |
Name | $smwgEntityCollation |
Description | Sets which collation entities in Semantic MediaWiki should sort with |
Default setting | identity |
Software | Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Installation |
Keyword | collation · sorting |
$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 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..1
Default setting[edit]
$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 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..
Available options[edit]
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 pointnumeric
− same asuppercase
, 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 asuca-default
with numeric sorting (since MediaWiki 1.28.0)uca-<langcode>
− same asuca-default
with language-specific adjustments (since MediaWiki 1.21.0)uca-<langcode>-u-kn
− same asuca-<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[edit]
$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"Allows to do mass updates of database field "smw_sort" on the occasion that setting for the entity collation was changed 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[edit]
- Help page on sorting
- Help page on configuration parameter
$wgCategoryCollation
(MediaWiki.org) - Help page on maintenance script "updateEntityCollation.php"Allows to do mass updates of database field "smw_sort" on the occasion that setting for the entity collation was changed
References
- ^ Semantic MediaWiki: GitHub pull request gh:smw:2429