Help:Content translation/Translating/Templates

Templates are created independently for each wiki and they were not designed to be easily transferred across languages. For Content Translation to be able to transfer a template across languages automatically, it needs the equivalent templates to be connected in Wikidata, and additional metadata to indicate which are the equivalent parameters. This additional metadata is provided with templateData (where the parameters are described) and Content Translation will look for parameters with a common alias or name to copy the information over. In addition, [ https://github.com/digitalTranshumant/templatesAlignment/tree/master a machine learning approach] is used to automatically map parameters that are likely to be equivalent across languages, but that will not cover all cases.

For example, the Wikipedia template "Cite Web" is available in many languages as listed in Wikidata. In order to support a language not present in the list, the equivalent template has to be defined and added to the list for Content Translation to know it is the equivalent template. This will make possible for the correct template to be created, but data in the template still needs to be transferred. In order to transfer the info for the "title" field of the original template the system may need some clues about which is the equivalent parameter in the target language if it could not be figured out automatically. In this case, editing templateData to add an alias named "title" will help the system.

Mobile experience
On mobile, selecting a template to translate will show a specific template card with information about how much of the information can be transferred. this includes the following cases:


 * Missing template. No template is found for the target language.
 * Empty template. Target template is found and created but no parameters can be filled with the information present in the source.
 * Partial mapped. Target template is found but some parameters are still missing. Indicating how many of those missing parameters are mandatory and how many are optional.
 * Full mapped. All parameters that are filled in the source are transferred to the target and there are no other mandatory parameters missing in the target.