Valve Developer Community:Alternative Languages
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
In namespaces (main), Category, Valve Developer Community and Help
All the translated pages use {{LanguageBar}}
to link pages in another language and stand alone.
{{lang}}
or {{langsp}}
but those templates were edited to place LanguageBar and are currently just waiting to be rewritten to LanguageBarFor information about the requirements for titles on translated pages, see Titles ↓.
Here are the steps for translating a page in English into other languages:
- Copy the content of the English page. If there isn't a
{{LanguageBar}}
, then you should add one at the start of the page. - Follow the requirement of titles to entry the creating page of the corresponding language page.
- Start translating. Conventions:
- 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:{{L|<link name>|<alternative name>}}
. So you can use altname for translating links.{{L|Cubemaps|反射贴图}}
is an example, which is used in Chinese. External links don't need. - 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}}
. - 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.
- The links on the translated page within this website need to use template
- After finishing translating, save your contributions.
Changing links
[[info_target]]
→{{L|info_target|optional altname}}
[[Valve Developer Community:Tasks]]
→{{LProject|Tasks|optional altname}}
[[Help:Contents]]
→{{LHelp|Contents|optional altname}}
[[:Category:Level Design]]
→{{LCategory|Level Design|optional altname}}
also Special: links using {{LSpecial}}
which will take the translation available from the wiki interface. See its documentation for more info
[[Special:RandomRootpage]]
→{{LSpecial|RandomRootpage}}
Following regex can be used in Notepad++ to automatize this process (make sure 'Match case' is not ticked). For regex usable right inside the editing toolbar see {{LAuto}}
Find: \[\[(?!#)(?:(?<c>:Category:(?<cl>.*?))|(?<a>Category:(?<al>.*?))|(?<h>:?Help:(?<hl>.*?))|(?<v>:?(?:Project|Valve[ _]Developer[ _]Community):(?<vl>.*?))|(?<s>:?Special:(?<sl>.*?))|(?<m>:?(?!File([ _]talk)?:|Image([ _]talk)?:|Media:|Template([ _]talk)?:|MediaWiki([ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User([ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(?<ml>.*?)))\]\] Replace: (?{c}{{LCategory|$+{cl}}}:(?{a}{{ACategory|$+{al}}}:(?{h}{{LHelp|$+{hl}}}:(?{v}{{LProject|$+{vl}}}:(?{s}{{LSpecial|$+{sl}}}:(?{m}{{L|$+{ml}}}:))))))
Main Page
The translation on the main page is handled differently using interface language to determine what language to show up in and uses its own unique templates made specifically for it. To translate it edit page <language shortcut>/Main Page
. To make a link to Main Page there is {{LMainPage}}
.
Other namespaces
Relevant templates
Relevant language templates (see their doc pages for more info):
{{language}}
- returns language shortcut- {{Uselangflags}} - makes language bar at right side of the page that is changing user's interface language instead of having links to other pages
Template namespace
Most templates are set up to be universal and change their language based on where they are being transcluded. This is done most of the time using {{language}}
.
Usually there is a string subpage created for translations of templates
Different method used for notices Category:Dictionary/Notices
The rest
It would be very rare to need translations in other namespaces and generally it would be done based on user's interface language or in case of User namespaces it could be whatever the user decides to set up there.
Titles
It is important that all page names contain only ASCII characters; otherwise, the pages aren't handled correctly by the database.
{{LanguageBar}}
is a template that 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 tomain
namespace (such asCategory
), then the format is similar to those pages which aremain
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.
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.{{This is a}}
which are used on entity articles, material shader articles, console command/variable articles, etc. and will set a title to specified {{{name}}}{{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 are not viable
Language Checklist
Every language on the wiki should have:
- Translations for the following pages in the left sidebar:
- Following template translations:
- Optionally
- you can add translations of other language names to {{language name}}
- A dictionary of common/technical terms and their translations.
After these are met following can be done
- Adding icon of a flag representative of the language (most if not all already exist)
- Proper addition to
{{LanguageBar}}
- An addition to {{uselangflags}}
Abandoned translations
Translations with very few pages, not meeting most of the language checklist and not edited by user speaking such language in a long time.
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, all translations of the page (or just the desired ones) can be quickly marked with {{Updatetranslation}}
by pressing the white flag (needs better icon) in the language bar and following further instructions there.
See also
- Category:To_be_translated
- Category:Translation
{{Translate}}
{{LanguageBar}}
{{Language}}
{{L}}