跳转到内容

模板:Google translation/doc

维基百科,自由的百科全书

Usage

[编辑]

This template creates an external link to a Google Translate page, which can translate the text from a Web page in a source language to a destination language. Syntax:

{{Google translation|destination language code|source language code|URL of page to translate|link text}}

If you leave the link text argument blank, “Google translation” appears as the default text.

Some URLs that contain special characters, such as & or =, will break the template. The solution is to prepend the URL with 3=, for example {{Google translation|ru|en|3=http://www.example.org/this-url-contains-=}} resulting in Google translation

The following languages below are available in any pairings, with their language code [1]. (As of March 26, 2021):

  • Afrikaans af
  • Albanian sq
  • Amharic am
  • Arabic ar
  • Armenian hy
  • Azerbaijani az
  • Basque eu
  • Belarusian be
  • Bengali bn
  • Bosnian bs
  • Bulgarian bg
  • Catalan ca
  • Cebuano ceb (ISO-639-2)
  • Chinese (Simplified) zh-CN or zh (BCP-47)
  • Chinese (Traditional) zh-TW (BCP-47)
  • Corsican co
  • Croatian hr
  • Czech cs
  • Danish da
  • Dutch nl
  • English en
  • Esperanto eo
  • Estonian et
  • Finnish fi
  • French fr
  • Frisian fy
  • Galician gl
  • Georgian ka
  • German de
  • Greek el
  • Gujarati gu
  • Haitian Creole ht
  • Hausa ha
  • Hawaiian haw (ISO-639-2)
  • Hebrew he or iw
  • Hindi hi
  • Hmong hmn (ISO-639-2)
  • Hungarian hu
  • Icelandic is
  • Igbo ig
  • Indonesian id
  • Irish ga
  • Italian it
  • Japanese ja
  • Javanese jv
  • Kannada kn
  • Kazakh kk
  • Khmer km
  • Kinyarwanda rw
  • Korean ko
  • Kurdish ku
  • Kyrgyz ky
  • Lao lo
  • Latin la
  • Latvian lv
  • Lithuanian lt
  • Luxembourgish lb
  • Macedonian mk
  • Malagasy mg
  • Malay ms
  • Malayalam ml
  • Maltese mt
  • Maori mi
  • Marathi mr
  • Mongolian mn
  • Myanmar (Burmese) my
  • Nepali ne
  • Norwegian no
  • Nyanja (Chichewa) ny
  • Odia (Oriya) or
  • Pashto ps
  • Persian fa
  • Polish pl
  • Portuguese (Portugal, Brazil) pt
  • Punjabi pa
  • Romanian ro
  • Russian ru
  • Samoan sm
  • Scots Gaelic gd
  • Serbian sr
  • Sesotho st
  • Shona sn
  • Sindhi sd
  • Sinhala (Sinhalese) si
  • Slovak sk
  • Slovenian sl
  • Somali so
  • Spanish es
  • Sundanese su
  • Swahili sw
  • Swedish sv
  • Tagalog (Filipino) tl
  • Tajik tg
  • Tamil ta
  • Tatar tt
  • Telugu te
  • Thai th
  • Turkish tr
  • Turkmen tk
  • Ukrainian uk
  • Urdu ur
  • Uyghur ug
  • Uzbek uz
  • Vietnamese vi
  • Welsh cy
  • Xhosa xh
  • Yiddish yi
  • Yoruba yo
  • Zulu zu

Some languages provide translations whose quality is not as good as a professional translation. This is because the underlying algorithms rely on having a sufficiently large corpus of existing high quality translations [2]. However, these translations are useful to get a rough idea of the original document. See Google Translate for updates to the list of available languages.

Avoid using in articles

[编辑]

WP:EL#Non-English language content advises against linking to non-English content from articles in the English Wikipedia, but does not forbid it in all cases. Links to machine-translated pages from articles may lead to disputes with other editors, who may feel the quality of translation is insufficient to create a reliable source. Therefore, use your judgment, and check the quality of translation to make sure it is adequate to use as a source.

There should be no problem with using this template on non-article pages, such as talk pages, the Help desk, and so on. See the similar advice for template such as {{Google}}.

Examples

[编辑]
Type this To get this What it produces
{{Google translation|en|zh-CN|https://zh.wikipedia.org|Translate the Chinese Wikipedia to English}} Translate the Chinese Wikipedia to English Translate the Chinese Wikipedia to English
{{Google translation|en|da|https://da.wikipedia.org|Translate the Danish Wikipedia to English}} Translate the Danish Wikipedia to English Translate the Danish Wikipedia to English
{{Google translation|en|nl|https://nl.wikipedia.org|Translate the Dutch Wikipedia to English}} Translate the Dutch Wikipedia to English Translate the Dutch Wikipedia to English
{{Google translation|en|de|https://de.wikipedia.org|Translate the German Wikipedia to English}} Translate the German Wikipedia to English Translate the German Wikipedia to English
{{Google translation|en|it|https://it.wikipedia.org|Translate the Italian Wikipedia to English}} Translate the Italian Wikipedia to English Translate the Italian Wikipedia to English
{{Google translation|en|pt|https://pt.wikipedia.org|Translate the Portuguese Wikipedia to English}} Translate the Portuguese Wikipedia to English Translate the Portuguese Wikipedia to English
{{Google translation|en|es|https://es.wikipedia.org|Translate the Spanish Wikipedia to English}} Translate the Spanish Wikipedia to English Translate the Spanish Wikipedia to English
{{Google translation|es|en|https://en.wikipedia.org|Translate the English Wikipedia to Spanish}} Translate the English Wikipedia to Spanish Translate the English Wikipedia to Spanish
{{Google translation|pt|en|https://en.wikipedia.org|Translate the English Wikipedia to Portuguese}} Translate the English Wikipedia to Portuguese Translate the English Wikipedia to Portuguese
{{Google translation|it|en|https://en.wikipedia.org|Translate the English Wikipedia to Italian}} Translate the English Wikipedia to Italian Translate the English Wikipedia to Italian
{{Google translation|ar|en|https://en.wikipedia.org|Translate the English Wikipedia to Arabic}} Translate the English Wikipedia to Arabic Translate the English Wikipedia to Arabic

See also

[编辑]
[编辑]


  1. ^ https://cloud.google.com/translate/docs/languages
  2. ^ https://www.aclweb.org/anthology/W17-5704/