手册:$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 68% complete.

Other languages:
English • ‎Nederlands • ‎español • ‎français • ‎polski • ‎português do Brasil • ‎русский • ‎العربية • ‎فارسی • ‎中文 • ‎日本語
General Settings:$wgSitename
网站的名称。
引进版本: pre 1.1.0
移除版本: 仍在使用
允许的值: 字符串
默认值: 'MediaWiki'
'Wikipedia' 直至v1.2.0
其他设置:按首字母排序 | 按功能排序

详情

这是显示整个网站的名称。

这个设置始终在LocalSettings.phpManual:LocalSettings.php。 MediaWiki程序通常处理-在初始安装程序顺利安装后,提供的值包含在LocalSettings.php。

这个名字在整个系统中包含了很多次。 例如:维基百科的口号来自维基百科,自由的百科全书。使用的就是这个设置。 它主要提供魔术字{{SITENAME}}”使用。

如果未设置$wgMetaNamespaceManual:$wgMetaNamespace(“项目”名字空间),它将自动初始化该值。 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 $wgGrammarFormsManual:$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).

参见