Difference between revisions of "Template:Expand language"

From blackwiki
Jump to navigation Jump to search
imported>PrimeHunter
(change {{{topic}}} to {{{topic|}}} to avoid error when topic is undefined)
imported>DannyS712
m (Deepl -> DeepL, per edit request)
Line 11: Line 11:
 
{{#switch: {{{langcode|}}} <!--all languages with machine translate-->|af |am |ar |az |be |be-tarask |bg |bn |bs |ca |ceb |co |cs |cy |da |de |el |en |eo |es |et |eu |fa |fi |fr |fy |ga |gd |gl |gu |ha |haw |he |hi |hr |ht |hu |hy |id |ig |is |it |ja |jv |ka |kk |km |kn |ko |ku |ky |la |lb |lo |lt |lv |mg |mi |mk |ml |mn |mr |ms |mt |my |ne |nl |nn |no |ny |pa |pl |ps |pt |ro |ru |sd |sh |si |sk |sl |sm |sn |so |sq |sr |st |su |sv |sw |ta |te |tg |th |tl |tr |uk |ur |uz |vi |xh |yi |yo |zh |zu =
 
{{#switch: {{{langcode|}}} <!--all languages with machine translate-->|af |am |ar |az |be |be-tarask |bg |bn |bs |ca |ceb |co |cs |cy |da |de |el |en |eo |es |et |eu |fa |fi |fr |fy |ga |gd |gl |gu |ha |haw |he |hi |hr |ht |hu |hy |id |ig |is |it |ja |jv |ka |kk |km |kn |ko |ku |ky |la |lb |lo |lt |lv |mg |mi |mk |ml |mn |mr |ms |mt |my |ne |nl |nn |no |ny |pa |pl |ps |pt |ro |ru |sd |sh |si |sk |sl |sm |sn |so |sq |sr |st |su |sv |sw |ta |te |tg |th |tl |tr |uk |ur |uz |vi |xh |yi |yo |zh |zu =
 
* {{#if:{{{otherarticle|}}}|[https://translate.google.com/translate?&u=https%3A%2F%2F{{{langcode|}}}.wikipedia.org%2Fwiki%2F{{urlencode:{{{otherarticle}}}}}&sl={{{googlelangcode|{{{langcode|}}}}}}&tl=en&prev=_t&hl=en View] a machine-translated version of the {{#language:{{{langcode|}}}|en}} article.|}}
 
* {{#if:{{{otherarticle|}}}|[https://translate.google.com/translate?&u=https%3A%2F%2F{{{langcode|}}}.wikipedia.org%2Fwiki%2F{{urlencode:{{{otherarticle}}}}}&sl={{{googlelangcode|{{{langcode|}}}}}}&tl=en&prev=_t&hl=en View] a machine-translated version of the {{#language:{{{langcode|}}}|en}} article.|}}
* Machine translation like [https://deepl.com Deepl] or [https://translate.google.com/ Google Translate]  is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wikipedia.
+
* Machine translation like [https://deepl.com DeepL] or [https://translate.google.com/ Google Translate]  is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wikipedia.
 
|#default =  }}
 
|#default =  }}
 
* Do not translate text that appears unreliable or low-quality. If possible, verify the text with references provided in the foreign-language article.
 
* Do not translate text that appears unreliable or low-quality. If possible, verify the text with references provided in the foreign-language article.

Revision as of 06:31, 16 December 2019

50px Template documentation[view] [edit] [history] [purge]

Typical usage

If you find an article in the English Wikipedia is much less complete than the corresponding article in another language, there are a series of templates you can use to announce this on the page. Do not use this template, but instead, please use the appropriate template in Category:Expand by language Wikipedia templates. If the language you are looking for doesn't already have a template, see below for instructions on how to make one.

How to create a new daughter template using this template

{{Expand language
|langcode=
|otherarticle={{{1|}}}
|section={{{section|}}}
|date={{{date|}}}
|fa={{{fa|}}}
|topic=
|nodoc={{{nodoc|}}}
|no interwiki={{{no interwiki|}}}
}}

Example for Spanish (see {{Expand Spanish}}):

{{Expand language
|langcode=es
|otherarticle={{{1|}}}
|section={{{section|}}}
|date={{{date|}}}
|fa={{{fa|}}}
|topic={{{topic|}}}
}}

Uncommon override parameters:

|googlelangcode= <!-- for where Google's language translation code is not the same as the Wikipedia language translation code -->

(Currently only used in Template:Expand Norwegian (Nynorsk).)

For a list of all daughter templates, see Category:Expand by language Wikipedia templates.

What else needs to be done after you set up the template

For all of these steps, replace XXXX with the name of the language you just created. Template:What

1. Create a template documentation page.

This is easy. Just go to Template:Expand XXXX/doc. There, you should paste {{Expand language/howto|XXXX}}.

2. Set up the category where articles to be translated will go.

Go to Category:Articles needing translation from XXXX Wikipedia. There, paste the following:

{{Transcat
|language=XXXX
|empty=y
}}

You can also add categories there for Wikiprojects that may be interested.

Multiple languages

Multiple languages can be specified in the same template using |langcode2=, |otherarticle2=, |langcode3= and |otherarticle3=. This functionality is not accessible in wrapper templates.