LocalSettings.php should only contain one `wgLanguageCode` definition and the declaration should happen before `enableSemantics`.

From semantic-mediawiki.org
< Installation‎ | Troubleshooting
Administrator manualInstallationInstallation/TroubleshootingLocalSettings.php should only contain one `wgLanguageCode` definition and the declaration should happen before `enableSemantics`.

Issue[edit]

Semantic MediaWiki issues the following error message:1

LocalSettings.php should only contain one `wgLanguageCode` definition and the declaration
should happen before `enableSemantics`.

This issue appears if configuration parameter $wgLanguageCode (MediaWiki.org) was declared after invoking Semantic MediaWiki with the enableSemantics() function.

Solution[edit]

The issue can be mitigated recifying your wiki's configuration in the "LocalSettings.php" file:2

// should be placed in the top section of the file as part of the general configuration
$wgLanguageCode = 'fr';

// should be placed in the bottom section of the file as part of the specific configuration
enableSemantics( 'example.org' );

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:4682
  2. ^  Semantic MediaWiki: GitHub issue gh:smw:4680