Help:Multi-language Conventions: Difference between revisions
No edit summary |
Lars.kurth (talk | contribs) m (moved Xen:Multi-language Conventions to Help:Multi-language Conventions: Wrong namespace) |
||
(16 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Info| |
{{Info|Also see [[:Category:Languages]]!}} |
||
__TOC__ |
__TOC__ |
||
== Languages Template == |
== The Languages Template == |
||
Pages which exist in multiple translations must have the |
'''Pages and categories''' which exist in multiple translations must have the {{Tl|Languages}} template at the '''bottom of the page'''. This allows user to see the translations that are available for that page. |
||
⚫ | |||
If you use multiple languages, the {{Tl|Languages}} template must be on '''every page in that language'''. |
|||
<pre>{{Languages}}</pre>For example, [[[[Main Page]]]] has <pre>{{Languages}}</pre> |
|||
⚫ | |||
⚫ | |||
<pre>{{Languages|<name of English page>}}</pre>For example [[[[Main Page/pt]]]] has <pre>{{Languages|Main Page}}</pre> |
|||
<pre> |
|||
⚫ | |||
<!-- The content of the actual page is here. --> |
|||
<!-- The {{Languages}} template must be at the bottom of the page! --> |
|||
<!-- There should be NO empty lines after {{Languages}} --> |
|||
{{Languages}} |
|||
</pre> |
|||
⚫ | |||
<pre> |
|||
<!-- The content of the actual page is here. --> |
|||
<!-- The {{Languages}} template must be at the bottom of the page! --> |
|||
<!-- There should be NO empty lines after {{Languages}} --> |
|||
{{Languages|<name of English page>|<language code>}} |
|||
</pre> |
|||
For example [[[[Main Page/pt]]]] contains |
|||
<pre> |
|||
{{Languages|Main Page|pt}} |
|||
</pre> |
|||
⚫ | |||
== Naming conventions for translated pages == |
== Naming conventions for translated pages == |
||
Line 23: | Line 41: | ||
|- |
|- |
||
| Main Page'''/fr''' || [[:fr:|French]] |
| Main Page'''/fr''' || [[:fr:|French]] |
||
⚫ | |||
⚫ | |||
|- |
|- |
||
| Main Page'''/ja''' || [[:ja:|Japanese]] |
| Main Page'''/ja''' || [[:ja:|Japanese]] |
||
Line 31: | Line 47: | ||
|- |
|- |
||
| Main Page'''/pt''' || [[:pt:|Portuguese]] |
| Main Page'''/pt''' || [[:pt:|Portuguese]] |
||
⚫ | |||
⚫ | |||
|- |
|- |
||
| Main Page'''/zh''' || [[:zh:|Chinese]] |
| Main Page'''/zh''' || [[:zh:|Chinese]] |
||
Line 40: | Line 58: | ||
<pre>[[Archived/XCI Getting Started/pt]]</pre> |
<pre>[[Archived/XCI Getting Started/pt]]</pre> |
||
<pre>[[Template:Fmbox/doc/zh]]</pre> |
<pre>[[Template:Fmbox/doc/zh]]</pre> |
||
== Languages Category== |
== Languages Category== |
||
Translated pages must be Categorized: they must contain a category of the form |
Translated pages must be Categorized: they must contain a category of the form |
||
Line 56: | Line 75: | ||
E.g. |
E.g. |
||
<pre>[[DomU_Install_with_Virt-Manager/es]]</pre> |
<pre>[[DomU_Install_with_Virt-Manager/es]]</pre> |
||
If you keep links to |
If you keep links to English documents in a translation, it is a good idea to use the following convention |
||
<pre>[[DomU_Install_with_Virt-Manager]] (English)</pre> |
<pre>[[DomU_Install_with_Virt-Manager]] (English)</pre> |
||
such that people see, that the document is in English. |
such that people see, that the document is in English. |
||
== 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> |
|||
{{Languages|Foo|es}} |
|||
</pre> |
|||
The following notation also works, but is harder to use |
|||
<pre> |
|||
[[Category:Languages/es]] |
|||
{{Languages|Foo}} |
|||
</pre> |
|||
=== Example Category === |
|||
'''Page Category:Foo''' must contain |
|||
<pre> |
|||
{{Languages}} |
|||
</pre> |
|||
'''Page Category:Foo/es''' must contain |
|||
<pre> |
|||
{{Languages|:Category:Foo|es}} |
|||
</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 Policy = |
= Language Policy = |
||
Line 65: | Line 121: | ||
{{Languages}} |
{{Languages}} |
||
[[Category:Wiki Management]] |
Latest revision as of 16:21, 28 January 2013
Also see Category:Languages! |
The Languages Template
Pages and categories which exist in multiple translations must have the {{Languages}} template at the bottom of the page. This allows user to see the translations that are available for that page.
If you use multiple languages, the {{Languages}} template must be on every page in that language.
The English page contains:
<!-- The content of the actual page is here. --> <!-- The {{Languages}} template must be at the bottom of the page! --> <!-- There should be NO empty lines after {{Languages}} --> {{Languages}}
The translated page contains:
<!-- The content of the actual page is here. --> <!-- The {{Languages}} template must be at the bottom of the page! --> <!-- There should be NO empty lines after {{Languages}} --> {{Languages|<name of English page>|<language code>}}
For example [[Main Page/pt]] contains
{{Languages|Main Page|pt}}
The English version of a page is always the main version of a page, 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/ja | Japanese |
Main Page/ko | Korean |
Main Page/pt | Portuguese |
Main Page/pt-br | Brazilian 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.
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
{{Languages|Foo|es}}
The following notation also works, but is harder to use
[[Category:Languages/es]] {{Languages|Foo}}
Example Category
Page Category:Foo must contain
{{Languages}}
Page Category:Foo/es must contain
{{Languages|:Category:Foo|es}}
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 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.
Language: | English • français • português do Brasil |
---|