Template:Translation/doc: Difference between revisions

From PZwiki
(more info about editing)
(Change to actual documentation, add some content while at it)
Line 1: Line 1:
This is the wiki's translation database, and is used to translate elements of pages automatically. Subpages for each lagnuage are at their respective code.
<noinclude>{{Documentation subpage}}</noinclude>
The {{tlx|Translation}} template is used to maintain a list of English and the non-English equivalent for item names and common words, for use in templates and to translate elements of pages automatically. Each language subpage is a user-editable database containing English words and the non-English equivalents.


For details on how to add to the list of translations, please follow the below link to the corresponding language
Using the database helps in maintaining the same translations uniformly and easy changes in case something changes in the game update, so adding a word there and using proper template is preferred to translating the words directly.


== Suppоrted languages ==
==Database format==
{| class="pztable"
The entries are stored in the <code>| English word | english word = Translated word</code> with each pipe being equivalent to translate (for example different casing of the word).
! Page Name || Language || Language (local)
 
|-
HTML comments in the format of  <code><nowiki><</nowiki>!-- Comment --></code> can be stored to aid categorization and finding certain words. These are not included anywhere, but can be translated to help finding proper words for other translators.
| Translation || [[Template:Translation|English]] || [[Template:Translation|English]]
 
|-
==Usage==
| Translation'''/cs''' || [[Template:Translation/cs|Czech]] || [[Template:Translation/cs|Čeština]]
When incorporating to a page, one of the 3 templates should be used, depending on the situation. Using wrong one can lead to extra work being done in wiki, preventing showing certain pages in extreme cases.
|-
 
| Translation'''/de''' || [[Template:Translation/de|German]] || [[Template:Translation/de|Deutsch]]
#{{tlx|Translation}} Should be used where a link is not required, and just the translated word is needed. This template will search the list (switch) for the word in the first parameter, then display that instead of the English word, based on the language code (subpage).
|-
#{{tlx|T}} Should be used where a link is required. It will automatically get the translated word from the list in {{tlx|Translation}}.
| Translation'''/es''' || [[Template:Translation/es|Spanish]] || [[Template:Translation/es|Español]]
#{{tlx|Subpage}} Should be used for links (such as image links) where just the English word and language code are needed.
|-
 
| Translation'''/fr''' || [[Template:Translation/fr|French]] || [[Template:Translation/fr|Français]]
===Examples===
|-
{{tlx|Translation|Language}}
| Translation'''/hu''' || [[Template:Translation/hu|Hungarian]] || [[Template:Translation/hu|Magyar]]
;Produces:
|-
{{Translation|Language}}
| Translation'''/it''' || [[Template:Translation/it|Italian]] || [[Template:Translation/it|Italiano]]
 
|-
(Which will show the translated word, if it's in the database).
| Translation'''/ja''' || [[Template:Translation/ja|Japanese]] || [[Template:Translation/ja|日本語]]
 
|-
==How to add entries==
| Translation'''/ko''' || [[Template:Translation/ko|Korean]] || [[Template:Translation/ko|한국어]]
 
|-
===Getting started===
| Translation'''/nl''' || [[Template:Translation/nl|Dutch]] || [[Template:Translation/nl|Nederlands]]
#Make sure you're on the correct page – a template and not the documentation subpage ([[Template:Translation{{Subpage}}|this will be a link if you're on the wrong page]]).
|-
#Click the '''Edit''' button at the very top, not the one next to Template documentation. Or click <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} here]</span> to edit current page.
| Translation'''/no''' || [[Template:Translation/no|Norwegian]] || [[Template:Translation/no|Norsk]]
 
|-
===Making the edits===
| Translation'''/pl''' || [[Template:Translation/pl|Polish]] || [[Template:Translation/pl|Polski]]
#Once in the edit screen, you'll see a list of entries that look like: <code>| Language = {{Translation|Language}}</code>
|-
#Check to see if there is a category for the word(s) you want to add, such as <code><nowiki><</nowiki>!-- Other --></code>, or add a new one.
| Translation'''/pt''' || [[Template:Translation/pt|Portuguese]] || [[Template:Translation/pt|Português]]
#Add your word(s) in the following format (each entry should be on a new line separated by a pipe <code>|</code>): <code>| Language = {{Translation|Language}}</code>
|-
 
| Translation'''/ru''' || [[Template:Translation/ru|Russian]] || [[Template:Translation/ru|Русский]]
==See also==
|-
*[[Template:T]]
| Translation'''/th''' || [[Template:Translation/th|Thai]] || [[Template:Translation/th|ไทย]]
*[[Template:Subpage]]
|-
| Translation'''/uk''' || [[Template:Translation/uk|Ukrainian]] || [[Template:Translation/uk|Українська]]
|-
| Translation'''/zh''' || [[Template:Translation/zh|Chinese (Traditional)]] || [[Template:Translation/zh|中文]]
|-
| Translation'''/zh-cn''' || [[Template:Translation/zh-cn|Chinese (Simplified)]] || [[Template:Translation/zh-cn|中文(中国大陆)]]
|}

Revision as of 19:38, 4 June 2023

Notebook.png
This is a documentation subpage for Template:Translation.
It contains usage information and other content that is not part of the original template page.

The {{Translation}} template is used to maintain a list of English and the non-English equivalent for item names and common words, for use in templates and to translate elements of pages automatically. Each language subpage is a user-editable database containing English words and the non-English equivalents.

Using the database helps in maintaining the same translations uniformly and easy changes in case something changes in the game update, so adding a word there and using proper template is preferred to translating the words directly.

Database format

The entries are stored in the | English word | english word = Translated word with each pipe being equivalent to translate (for example different casing of the word).

HTML comments in the format of <!-- Comment --> can be stored to aid categorization and finding certain words. These are not included anywhere, but can be translated to help finding proper words for other translators.

Usage

When incorporating to a page, one of the 3 templates should be used, depending on the situation. Using wrong one can lead to extra work being done in wiki, preventing showing certain pages in extreme cases.

  1. {{Translation}} Should be used where a link is not required, and just the translated word is needed. This template will search the list (switch) for the word in the first parameter, then display that instead of the English word, based on the language code (subpage).
  2. {{T}} Should be used where a link is required. It will automatically get the translated word from the list in {{Translation}}.
  3. {{Subpage}} Should be used for links (such as image links) where just the English word and language code are needed.

Examples

{{Translation|Language}}

Produces

Language

(Which will show the translated word, if it's in the database).

How to add entries

Getting started

  1. Make sure you're on the correct page – a template and not the documentation subpage (this will be a link if you're on the wrong page).
  2. Click the Edit button at the very top, not the one next to Template documentation. Or click here to edit current page.

Making the edits

  1. Once in the edit screen, you'll see a list of entries that look like: | Language = Language
  2. Check to see if there is a category for the word(s) you want to add, such as <!-- Other -->, or add a new one.
  3. Add your word(s) in the following format (each entry should be on a new line separated by a pipe |): | Language = Language

See also