Help:Multi-language Conventions: Difference between revisions
Lars.kurth (talk | contribs) |
Lars.kurth (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Also see [[:Category:Languages]]!}} |
{{Info|Also see [[:Category:Languages]]!}} |
||
__TOC__ |
__TOC__ |
||
= Usage = |
|||
== Languages Template == |
== Languages Template == |
||
Pages which exist in multiple translations must have the [[Languages:Template]] at the '''bottom of the page'''. This allows users to see the translations that are available for that page. There are two cases: |
Pages which exist in multiple translations must have the [[Languages:Template]] at the '''bottom of the page'''. This allows users to see the translations that are available for that page. There are two cases: |
Revision as of 17:46, 29 November 2011
Also see Category:Languages! |
Languages Template
Pages which exist in multiple translations must have the Languages:Template at the bottom of the page. This allows users to see the translations that are available for that page. There are two cases: The English page has:
{{Languages}}
For example, [[Main Page]] has
{{Languages}}
The translated page has:
{{Languages|<name of English page>}}
For example [[Main Page/pt]] has
{{Languages|Main Page}}
The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below).
Naming conventions for translated pages
Translated pages need to follow the following naming conventions.
<My Page Name>/<2 Letter Language Code>
The two letter language code must be one of the codes shown in the supported languages table, for example
Page Name | Language |
---|---|
Main Page | English |
Main Page/de | German |
Main Page/es | Spanish |
Main Page/fr | French |
Main Page/it | Italian |
Main Page/ja | Japanese |
Main Page/ko | Korean |
Main Page/pt | Portuguese |
Main Page/zh | Chinese |
Examples
Examples of valid page names are:
[[Category:Xen/ja]]
[[Frontend_Driver/de]]
[[Archived/XCI Getting Started/pt]]
[[Template:Fmbox/doc/zh]]
Languages Category
Translated pages must be Categorized: they must contain a category of the form
[[Category:Languages/<Language code>]]
such that it is possible to find all pages of a specific language.
Examples
Examples of valid category names are:
[[Category:Languages/ja]]
[[Category:Languages/pt]]
Links for translated pages
You have to be careful when linking to other pages. Say you want to link to
[[DomU_Install_with_Virt-Manager]]
If you use the page above, you will go to the English page. If you want to go to a translated page, the link must look as follows
[[DomU_Install_with_Virt-Manager/<language code>]]
E.g.
[[DomU_Install_with_Virt-Manager/es]]
If you keep links to english documents in a translation, it is a good idea to use the following convention
[[DomU_Install_with_Virt-Manager]] (English)
such that people see, that the document is in English.
Language Policy
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.
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.