Manual:$wgSitename

From mediawiki.org
This page is a translated version of the page Manual:$wgSitename and the translation is 63% complete.
一般的な設定: $wgSitename
サイトの名前。
導入されたバージョン:pre 1.1.0
除去されたバージョン:使用中
許容される値:(文字列)
既定値:'MediaWiki'
'Wikipedia' (バージョン 1.2.0 まで)

詳細

サイトの至るところに表示される、サイトの名前です。

この設定はLocalSettings.php から常に設定する必要があります。 MediaWikiのインストーラーは通常これを処理します。初期設定中に提供された値は、設定プロセスが正常に完了するとLocalSettings.phpに含まれます。

この名前は、システムの至るところに何度も含まれます。 例えば、ウィキペディアのタグライン From Wikipedia, the free encyclopedia. はこの設定を使用しています。 主にマジックワード{{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).

関連項目