Manual:Namespace/ja

名前空間は、類似した目的を持つコンテンツの集合体です. つまり、同じ場所で使用することを意図したページです. 名前空間は、同じウィキ内にさまざまな種類の情報を格納するための区切りと見なすことができ、「真の」コンテンツを利用者のプロフィールやヘルプ ページなどと別に格納できるようにします.

技術的な概要
ページは名前空間内に存在しますが、これはページ名の中のコロン (:) で区切られた部分である名前空間接頭辞で見分けられます.

例:

「標準名前空間」には接頭辞がありません. また、標準名前空間では、既存の名前空間接頭辞のあとにコロンを付けた文字列で始まるページ名は作成できません.

ページ名の一部である接頭辞を変更するだけで、名前空間を跨いでページを移動させることができます.

Namespace prefixes can be translated, and aliases can be configured for each (see ). All namespaces also have a "canonical" prefix, which works on all wikis regardless of configuration. Aliases and canonical names can be used in links, when performing a search, and in the page title with the help of the magic word.

Each namespace has a corresponding namespace index. Within the database, the title is split into namespace index and text title, and this is used for storage in the page.page_namespace and page.page_title columns, among others.

メインの名前空間とトーク名前空間

 * See Help:Talk pages for instructions on how to use talk pages.

Most namespaces have an associated discussion namespace (or "talk" namespace). All discussion namespaces have odd-integer indices, and the discussion namespace index for a specific namespace with index n is n+1. The namespaces with even-integer indices are subject namespaces (note that this is a distinct concept from content namespaces). The subject-talk duality can be explored using the  and   magic words. The  tag of pages in talk namespaces has the " " CSS class, which might be useful for styling.

組み込みの名前空間
MediaWiki ships with 18 built-in namespaces:
 * 16 "real" namespaces, corresponding to actual pages, numbered 0 to 15, and grouped in subject/talk pairs
 * 2 "virtual" namespaces (one for dynamically generated special pages, and one serving as an alias for direct file links), numbered -1 and -2, respectively. Since these namespaces don't correspond to pages stored in the database, one cannot create or delete pages in these namespaces, and there are no corresponding discussion namespaces.

The full list is presented in the table below.

Each namespace also has a constant derived from its name, with all letters in uppercase, spaces replaced by underscores, and prefixed by "NS_". For example, the constant for the "User talk" namespace is NS_USER_TALK. A complete list can be found in Manual:Namespace constants.

configuration variable.

詳細な概要については、カスタム名前空間の使用を参照してください.

機能
Project や Help など一部の名前空間は、利便性のみのために存在しており、標準名前空間と比較しても追加的な機能はありません.

テンプレート名前空間のページは、参照読み込みの際に名前空間接頭辞を省略できます.

User namespace pages are associated with user accounts or IP addresses. Changes to user talk pages generate an automatic message notification.

Pages in "MediaWiki" namespace are used to override default messages in language file and can only be edited by administrators or other users with the editinterface permission.

File and Category pages have special functionality, as described in and. Category pages cannot be moved (renamed) yet (but they can be exported and then imported, if you need to maintain edit history). Image moving can be enabled with  in MediaWiki 1.13 and above.

All pages in discussion namespaces have "post a comment" feature (see Help:Section#Adding a section at the end on Meta).

関連項目

 * Manual:Configuration settings#Namespaces
 * , containing the MWNamespace class
 * Help:Namespace on Meta
 * , containing the MWNamespace class
 * Help:Namespace on Meta
 * , containing the MWNamespace class
 * Help:Namespace on Meta