Valve Developer Community:Alternative Languages

From Valve Developer Community
Jump to: navigation, search
English (en)Deutsch (de)Français (fr)中文 (zh)
Shortcut
VDC:AL
Icon-broom.png
This article or section needs to be updated to include current information regarding the subject because:
This page needs to be updated to match the current translation standard
Remember to check for any notes left by the tagger at this article's talk page.

This page is a reference on having alternative languages here on the Valve Developer Community. 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.

For information on how to add a new language, see the language checklist.

Translate Pages

According to the new standard, all the translated pages use {{LanguageBar}} to link pages in another language and stand alone.

For information about the requirements for titles on translated pages, see #Titles.

Here are the steps for translating a page in English into other languages:

  1. Copy the content of the English page. If there isn't a {{LanguageBar}}, then you should add one at the start of the page.
  2. Follow the requirement of titles to entry the creating page of the corresponding language page.
  3. Start translating. Conventions:
    1. The links on the translated page within this website need to use template {{L}}. For example, [[ExampleLink]] will become {{L|ExampleLink}}. If the link has alternative name, then follow this format: {{A|<link name>|<alternative name>}}. So you can use altname for translating links. {{L|Main Page|主页}} is an example, which is used in Chinese. External links don't need.
    2. The categories on the page also need to use {{ACategory}}. The method is the same as above. For example, [[Category:Entities]] will become {{ACategory|Entities}}.
      If the category is a link instead of that adding the page to itself, use {{LCategory}} (i.e. [[:Category:Entities]]{{LCategory|Entities}}). These 2 templates also support altname like that in {{L}}.
    3. Templates itself remain unchanged because the language and text inherent in the template are automatically translated. But you need to translate the value of the parameter used in the template. For example, the notes written by {{Note}} won't be translated and you should translate them.
  4. After finishing translating, save your contributions.

Titles

It is important that all page names contain only ASCII characters; otherwise, the pages aren't handled correctly by the database.

Currently

For pages using {{LanguageBar}}
{{LanguageBar}} is a new template that is similar to {{Lang}}, which will create a series of flags that can switch to the page of the corresponding language. It has adopted the new translation standard.
Normally, the titles of most of the translated pages follow this format: <language name>/<Page name>, which the language name must be abbreviation, and the page name is the same as the English page. An example is Zh/Main Page, which is the translations of Main Page in Chinese.
If the page does not belong to main namespace (such as Category), then the format is similar to those pages which are main namespaces: <namespace>:<lang name>/<page name>, such as Valve Developer Community:Zh/Alternative Languages.
Actually, the language name prefix determines the language of each page. Templates will determine what language they should use according to the prefix.
Icon-Important.pngImportant:Do not add language name prefix for English pages! English pages do not need their language name to be the prefixs of their names.
Icon-Important.pngImportant:Do not use this method on templates. Templates do not need extra pages for translating. Instead, translations for templates are combined into the template page itself or some templates use a special string subpage for translating the template.

Deprecated Method

Note.pngNote:Do not try to use these methods on new pages.
For pages using {{MultiPage}}
The title for a translated page (called "language subpages") should be the English name followed by a forward slash (/) and the abbreviation (usually ISO_639-1) for the language. This includes English. The root page should only have {{MultiPage}} and categories. An correct title is Half-Life 2/en. Language subpages should have the {{Language subpage}} template at the top followed by the body text for the article. Remember, categories go on the root page only, not the subpages.
For pages using {{Lang}}
The name of a translated page should put the English name first, followed by a colon (:), followed by the abbreviation described in {{Lang}}'s documentation (which is not always the language's ISO_639-1 and ISO_639-2 abbreviation). An example of a proper page name is Help:Contents:ru. It is not a problem to use non-English text in the pages themselves, but the name of the page cannot contain any non-English, non-ASCII characters.

English pages are usually the originals (with the exception of MultiPage having the /en page, but the main page itself always have the original English language), and there is no :en tag on them.

Change the Title

There are a number of ways to change how a page title will appear to readers without affecting the URL.

  • {{LanguageBar}}: To translate the title, specify the value of {{{title}}} to what you translated.
  • {{MultiPage}}: Deprecated. Do not use this if possible!
  • {{Lang}}: Deprecated. Only should be used if other language templates doesn't work properly. Do not use this if possible!
  • {{This is a}} (The series of templates such as {{base point}} are deprecated), which are used on entity articles, material shader articles, console command/variable articles, etc.
  • {{DISPLAYTITLE:title}} - This is not a template, rather a magic word to change the page title to whatever you want. All the templates listed use this internally. This should only be used in rare scenarios where all other methods fail, but is still preferred before lang.

Linking to Pages in Another Language

Please use {{LanguageBar}}. {{LanguageBar}} will create a series of flags on the right top used for switching to the page of target language.


Templates

Using {{Autolang}}, {{Uselangflags}} and {{String}}

{{Autolang}} will change the contents according to the page language. There are some strings subpages in some templates (such as {{Software page}}), and the translations are in them. All the strings subpages use this template internally.

See the documentation of the template for its usage. Alternatively, check the source code of pages that have already used this template to learn how to use it.

{{String}} is the alternative version of {{Autolang}}. It is specially designed for those templates that use strings for translating.

Using {{Lang}} (deprecated)

Obsolete-notext.png Deprecated: Only use this sparingly if other translation template isn't working on certain templates at the moment, eventually there will be somebody able to properly fix it and properly use the {{Autolang}} template, to the point that {{Lang}} isn't needed anymore.

Templates containing text visible on content pages should have that text translated into the translated page's language before the page is considered finished. Any documentation on the template should also be translated.

Templates without visible text may also have their documentation translated. If the template itself is identical to the English one however, the "translated" template should not be used on pages, because then if one version of the template is changed, it creates a needless hassle to change other versions as well, even though the templates are identical.

Categories

Categories are needed to be separated by language. If you want translations for categories page, follow the method of translating pages.

Language Checklist

Every language on the wiki should have:

  • An icon of a flag representative of the language Flag-en.png
Tip.pngTip:Most of the flags currently on the wiki seem to come from this site
Icon-Important.pngImportant:DO NOT create a separate template for the flag such as Template:en, these are leftovers from {{Lang}}
Blank image.pngTodo: More?

Final Notes

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

Please fully translate pages. A page partially in another language is simply not helpful for readers who only know one language.

If a page has received an important update, translations of the page should be marked with {{Updatetranslation}}.

See also