Manuel:$wgSitename

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgSitename and the translation is 37% complete.
Other languages:
English • ‎Nederlands • ‎español • ‎français • ‎polski • ‎português do Brasil • ‎русский • ‎中文 • ‎日本語
Paramètres généraux: $wgSitename
Le nom du site.
Introduit dans la version :pre 1.1.0
Retiré dans la version :Encore utilisé
Valeurs autorisées :(chaîne)
Valeur par défaut :'MediaWiki'
'Wikipedia' (supérieur à la version 1.2.0)

Détails

Le nom du site, comme affiché dans l'ensemble du site.

This setting should always be set from LocalSettings.php . The MediaWiki installer usually handles this – the value provided during initial setup is included in LocalSettings.php once the setup process is completed successfully.

This name gets included many times throughout the system. For instance, the Wikipedia tagline From Wikipedia, the free encyclopedia. makes use of this setting. It is mainly used through the magic word "{{SITENAME}}".

If $wgMetaNamespace (the "project" namespace) is not set, it will be automatically initialized to this value. Make sure the name is appropriately formatted with valid title characters, etc. Also, it cannot be empty, contain the # character, or be the string "MediaWiki". [1]

If you need to supply different grammatical forms for the site name, use $wgGrammarForms in your LocalSettings.php, for example for Polish:

$wgSitename = "Encyklopedia";
$wgGrammarForms['pl']['D.lp'][$wgSitename] = "Encyklopedii";
$wgGrammarForms['pl']['C.lp'][$wgSitename] = "Encyklopedii";
$wgGrammarForms['pl']['B.lp'][$wgSitename] = "Encyklopedię";
$wgGrammarForms['pl']['N.lp'][$wgSitename] = "Encyklopedią";
$wgGrammarForms['pl']['MS.lp'][$wgSitename] = "Encyklopedii";
$wgGrammarForms['pl']['W.lp'][$wgSitename] = "Encyklopedio";

$wgGrammarForms['pl']['M.lm'][$wgSitename] = "Encyklopedie";
$wgGrammarForms['pl']['D.lm'][$wgSitename] = "Encyklopedie";
$wgGrammarForms['pl']['C.lm'][$wgSitename] = "Encyklopediom";
$wgGrammarForms['pl']['B.lm'][$wgSitename] = "Encyklopedie";
$wgGrammarForms['pl']['N.lm'][$wgSitename] = "Encyklopediami";
$wgGrammarForms['pl']['MS.lm'][$wgSitename] = "Encyklopediach";
$wgGrammarForms['pl']['W.lm'][$wgSitename] = "Encyklopedie";

This can be quickly checked using MediaWiki:Userlogin-joinproject and MediaWiki:Createacct-benefit-heading messages.


  1. Other namespace names are technically possible, but will usually make the interface behave in unexpected ways when a page in the project namespace is visited (such as "no such user/file/special page found"-type messages).

Voir aussi