Difference between revisions of "Help:Language policy"

From Xen
m (Language codes)
(Added Examples)
Line 14: Line 14:
   
 
''Note that the rule that English content should not be placed in sub-pages does not apply to other namespaces. This is one of the issues that needs resolving.''
 
''Note that the rule that English content should not be placed in sub-pages does not apply to other namespaces. This is one of the issues that needs resolving.''
  +
  +
== Examples & Testing ==
  +
=== Example Page ===
  +
Note that it is important to follow the conventions as outlined here. If not followed, the language templates do not work properly and users will find it hard to find translated content.
  +
  +
'''Page Foo''' must contain
  +
<pre>
  +
{{Languages}}
  +
</pre>
  +
  +
'''Page Foo/es''' must contain
  +
<pre>
  +
[[Category:Languages/es]]
  +
{{Languages|Foo}}
  +
</pre>
  +
  +
=== Example Category ===
  +
'''Page Category:Foo''' must contain
  +
<pre>
  +
{{Languages}}
  +
</pre>
  +
  +
'''Page Category:Foo/es''' must contain
  +
<pre>
  +
[[Category:Languages/es]]
  +
{{Languages|:Category:Foo}}
  +
</pre>
  +
  +
=== Testing whether you have done OK ===
  +
You should be able to see the following:
  +
* A box called ''''Languages''' on the english and translated page (see bottom of [[Main_Page|Main Page]] as an example)
  +
* A box called ''''Languages''' on the english and translated category
  +
* The ''''Languages''' box should show: '''English''', '''The Language You added''', languages somebody else added. If it doesn't, you probably used the wrong language macro on the english page.
  +
* Translated pages should be in the '''Language/<your language>''' category, e.g. '''Language/es'''. You should go to the category for your language and check whether all pages are in this category.
   
 
== Language codes ==
 
== Language codes ==

Revision as of 18:06, 23 April 2012

Languages

This page describes the current multi-lingual policy on wiki.xen.org.

The main page

The English version of our front page is located at Main Page. Translated versions are located at MediaWiki/code, where code is the language code (e.g. Main Page/fr).

Importantly, the rules about language codes (see below) should be followed here as well.

Other namespaces

Apart from the Main Page, no policy has yet been decided about other namespaces. For the time being, if you would like to create translations for pages in other namespaces then please do so as described for the Help: namespace, however content may be moved or deleted depending on the policy that is eventually adopted.

Note that the rule that English content should not be placed in sub-pages does not apply to other namespaces. This is one of the issues that needs resolving.

Examples & Testing

Example Page

Note that it is important to follow the conventions as outlined here. If not followed, the language templates do not work properly and users will find it hard to find translated content.

Page Foo must contain

{{Languages}}

Page Foo/es must contain

[[Category:Languages/es]]
{{Languages|Foo}}

Example Category

Page Category:Foo must contain

{{Languages}}

Page Category:Foo/es must contain

[[Category:Languages/es]]
{{Languages|:Category:Foo}}

Testing whether you have done OK

You should be able to see the following:

  • A box called 'Languages on the english and translated page (see bottom of Main Page as an example)
  • A box called 'Languages on the english and translated category
  • The 'Languages box should show: English, The Language You added, languages somebody else added. If it doesn't, you probably used the wrong language macro on the english page.
  • Translated pages should be in the Language/<your language> category, e.g. Language/es. You should go to the category for your language and check whether all pages are in this category.

Language codes

Throughout wiki.xen.org you should use the language codes specified by the MediaWiki software when creating language-specific content (see Names.php for the full and up-to-date list).

Please also bear the following in mind:

  • If the language code is not found in Names.php then we should not host pages in that language.
  • If MediaWiki uses the 'incorrect' code for a language then you should also (for consistency) use that incorrect code here. If you think a code is incorrect you should discuss it on MediaWiki Bugzilla, and if this results in it being changed we will move the pages to match.
  • Note that some language codes in Names.php are now deprecated (e.g. zh-yue has been replaced with yue). In these cases only the most recent code should be used.