Valve Developer Community:Alternative Languages: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
This page is a reference on having alternative languages on the Valve Developer Community.
{{otherlang2|
ru = Valve Developer Community:Alternative Languages:ru|
zh-cn = Valve Developer Community:Alternative Languages:zh-cn
}}
 
{{toc-right}}
 
This page is a reference on having alternative languages here on the Valve Developer Community.


== Translating your page ==
== Translating your page ==
Line 5: Line 12:


=== Required naming scheme ===
=== Required naming scheme ===
It is important that page, category, and article titles contain only [[Wikipedia:ASCII|ASCII]] characters in the format of "English title:language abbreviation".  That is, keep a page's English title, and add a colon then the 2-letter [[Wikipedia:ISO 639-2|ISO 639-2 alpha-2]] language code for that language.
It is important that page, category, and article titles contain only [[Wikipedia:ASCII|ASCII]] characters in the format of "English title:language abbreviation".  That is, keep a page's English title, and add a colon then the 2-letter [[Wikipedia:ISO 639-2|ISO 639-2 alpha-2]] language code for that language. For example [[Command Line Options:jp]].
Example: [[Command Line Options:jp]]
 
The reason for this is partially due to a technical limitation of the software the VDC runs on. Pages, titles, and categories with non-English characters (such as "д", "к", or "ỹ") do not get backed up correctly in the database. It is not a problem to use non-English text in the pages themselves, but the page/article titles cannot contain these non-English, non [[Wikipedia:ASCII|ASCII]] characters.
The reason for this is partially due to a technical limitation of the software the VDC runs on. Pages, titles, and categories with non-English characters (such as "д", "к", or "ỹ") do not get backed up correctly in the database. It is not a problem to use non-English text in the pages themselves, but the page/article titles cannot contain these non-English, non [[Wikipedia:ASCII|ASCII]] characters.


Please note that English articles are usually the originals and there is no :en tag required on them.
Please note that English articles are usually the originals and there is no :en tag required on them.


== Other language templates ==
== Adding links ==
The templates used to mark a page that is translated into other languages are set up so they can be used for and in any language.


Example for an English page that has a Japanese translation:
[[Template:Otherlang2]] generates a row of flags in the top-right of the page. Use it like this:
<pre><nowiki>
{{otherlang:en}}
{{otherlang:en:jp|Destination page:jp}}
</nowiki></pre>


Example for a Spanish page that has English and German translations:
<pre><nowiki>
<pre><nowiki>
{{otherlang:es}}
{{otherlang2|
{{otherlang:es:en|Destination page}},
es = Destination page:es|
{{otherlang:es:de|Destination page:de}}
de = Destination page:de|
jp = Destination page:jp
}}
</nowiki></pre>
</nowiki></pre>


=== Syntax form ===
The template '''must''' be the first text on the page! You should also do your best to update all the other translated pages, not just your own and English.
If you notice, there are several parts to the templates used to create these statements. The first part,
<code><nowiki>{{otherlang:</nowiki>'''Current language code'''<nowiki>}}</nowiki></code>
represents the ''This language is avaliable in:'' in that language. It is followed one or more statements of
<code><nowiki>{{otherlang:</nowiki>'''Current language code'''<nowiki>:</nowiki>'''Destination language code'''<nowiki>|</nowiki>'''Destination page'''<nowiki>}}</nowiki></code>
which has text written in both the current page's language and the destination page's language, which links to the destination page.
 
== Creating language tag templates ==
Creating templates for alternative languages is easy. Simply copy the code for existing templates, and put them into templates replaced with your correct language code. Please be sure to put your target language's name in both your language and the target language's.
 
Example ([[:Template:otherlang:es:en|Spanish]]):
Inglés (English)
 
A template can be modified by going to <code>Template:''name''</code>; for example, the <code>otherlang:pl:en</code> template can be modified by going to <code>Template:otherlang:pl:en</code>.
 
The code for <code>otherlang:'''''xx'''''</code> is:
<nowiki><br style="clear:both;" /></nowiki>
<nowiki>----</nowiki>
&lt;small>'''''translation1''''': &lt;/small>
 
The code for <code>otherlang:'''''xx''''':'''''yy'''''</code> is:
<nowiki><small>[[{{{1}}}|</nowiki>'''''translation2''''' ('''''translation3'''''<nowiki>)]]</small></nowiki>
Where:
* '''''xx''''' is the language code of your language
* '''''yy''''' is the language code of the other language
* '''''translation1''''' is the phrase "This page is also available in", translated to your language
* '''''translation2''''' is the name of the other language, translated to your language
* '''''translation3''''' is the name of the other language, translated to its own language
 
Examples:
* [[Template:otherlang:en]] (written in English)
* [[Template:otherlang:en:es]] (says "Spanish" in English and Spanish)
* [[Template:otherlang:es]] (written in Spanish)
* [[Template:otherlang:es:en]] (says "English" in Spanish and English)
 
* [[Template:otherlang:en]] (written in English)
* [[Template:otherlang:en:sv]] (says "Swedish" in English and Swedish)
* [[Template:otherlang:sv]] (written in Swedish)
* [[Template:otherlang:sv:en]] (says "English" in Swedish and English)


== Available languages ==
== Available languages ==
Line 77: Line 42:


[[Category:Languages]]
[[Category:Languages]]
{{otherlang:en}}
{{otherlang:en:ru|Valve_Developer_Community:Alternative_Languages:ru}},
{{otherlang:en:zh-cn|Valve_Developer_Community:Alternative_Languages:zh-cn}}

Revision as of 11:01, 23 December 2010

Template:Otherlang2

This page is a reference on having alternative languages here on the Valve Developer Community.

Translating your page

Translating the page you want should be simple if you are fluent in a language. This article does not go into depth in translation of articles.

Required naming scheme

It is important that page, category, and article titles contain only ASCII characters in the format of "English title:language abbreviation". That is, keep a page's English title, and add a colon then the 2-letter ISO 639-2 alpha-2 language code for that language. For example Command Line Options:jp.

The reason for this is partially due to a technical limitation of the software the VDC runs on. Pages, titles, and categories with non-English characters (such as "д", "к", or "ỹ") do not get backed up correctly in the database. It is not a problem to use non-English text in the pages themselves, but the page/article titles cannot contain these non-English, non ASCII characters.

Please note that English articles are usually the originals and there is no :en tag required on them.

Adding links

Template:Otherlang2 generates a row of flags in the top-right of the page. Use it like this:

{{otherlang2|
es = Destination page:es|
de = Destination page:de|
jp = Destination page:jp
}}

The template must be the first text on the page! You should also do your best to update all the other translated pages, not just your own and English.

Available languages

Languages available can be found in the Languages category.

In order to have your language category listed in the primary Languages category, add the following to your language's category article:

[[Category:Languages]]

Final notes

This guide is not definitive, but it makes things much simpler when everyone follows one method of using the templates, so everything in the wiki stays consistent throughout languages.