Template:Google Translations: Difference between revisions

From OLPC
Jump to navigation Jump to search
(re-implemented, changes semantics! (but is unused, so))
m (document categories)
Line 1: Line 1:
<span class="plainlinks">''{{{title|Google}}}{{#if:{{{ar|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Car&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ar}}]}}{{#if:{{{de|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cde&hl=en&ie=UTF-8&oe=UTF-8 {{#language:de}}]}}{{#if:{{{es|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Ces&hl=en&ie=UTF-8&oe=UTF-8 {{#language:es}}]}}{{#if:{{{fr|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8 {{#language:fr}}]}}{{#if:{{{it|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cit&hl=en&ie=UTF-8&oe=UTF-8 {{#language:it}}]}}{{#if:{{{ja|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cja&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ja}}]}}{{#if:{{{ko|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cko&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ko}}]}}{{#if:{{{pt|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cpt&hl=en&ie=UTF-8&oe=UTF-8 {{#language:pt}}]}}{{#if:{{{ru|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cru&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ru}}]}}{{#if:{{{zh|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Czh-CN&hl=en&ie=UTF-8&oe=UTF-8 {{#language:zh-CN}}]}}''</span>
<span class="plainlinks">''{{{title|Google}}}{{#if:{{{ar|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Car&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ar}}]}}{{#if:{{{de|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cde&hl=en&ie=UTF-8&oe=UTF-8 {{#language:de}}]}}{{#if:{{{es|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Ces&hl=en&ie=UTF-8&oe=UTF-8 {{#language:es}}]}}{{#if:{{{fr|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8 {{#language:fr}}]}}{{#if:{{{it|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cit&hl=en&ie=UTF-8&oe=UTF-8 {{#language:it}}]}}{{#if:{{{ja|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cja&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ja}}]}}{{#if:{{{ko|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cko&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ko}}]}}{{#if:{{{pt|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cpt&hl=en&ie=UTF-8&oe=UTF-8 {{#language:pt}}]}}{{#if:{{{ru|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cru&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ru}}]}}{{#if:{{{zh|}}}|'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Czh-CN&hl=en&ie=UTF-8&oe=UTF-8 {{#language:zh-CN}}]}}''</span>
[[Category:Wanted translation|{{PAGENAME}}]]
[[Category:Wanted translations|{{PAGENAME}}]]
[[Category:Wanted translation{{#if:{{{ar|}}}|s lang-ar}}|{{PAGENAME}}]]
[[Category:Wanted translation{{#if:{{{ar|}}}|s lang-ar}}|{{PAGENAME}}]]
[[Category:Wanted translation{{#if:{{{de|}}}|s lang-de}}|{{PAGENAME}}]]
[[Category:Wanted translation{{#if:{{{de|}}}|s lang-de}}|{{PAGENAME}}]]
Line 43: Line 43:
| zh = ''show'' &lt;!-- OPTIONAL -- shows link for chinese (simplified) translation --&gt;
| zh = ''show'' &lt;!-- OPTIONAL -- shows link for chinese (simplified) translation --&gt;
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>

== Categories ==
* The page is added to [[:Category:Wanted translation]]
* For each requested translation language (ar, de, etc.) the page is added to "Category:Wanted translations ''lang''"


== Sample ==
== Sample ==

Revision as of 05:45, 24 May 2009

Google



This template adds a series of automatic (machine) translation links to the including page. They use Google as the engine, and takes a page in English and can translate it into one of the following:

  • ar - arabic (العربية)
  • de - german (Deutsch)
  • es - spanish (español)
  • fr - french (français)
  • it - italian (italiano)
  • ja - japanese (日本語)
  • ko - korean (한국어)
  • ru - russian (русский)
  • zh - chinese (simplified) (中文)

Usage

In order to show languages from the list (for example when there isn't a human translation available) you may specify for each language code "show" and will not be included. When a human translation becomes available, just remove the parameter for the given language.

{{ Google Translations
   | title =       <!-- OPTIONAL -- title (defaults to 'Google' -->
   | ar = show     <!-- OPTIONAL -- shows link for arabic translation -->
   | de = show     <!-- OPTIONAL -- shows link for german translation -->
   | es = show     <!-- OPTIONAL -- shows link for spanish translation -->
   | fr = show     <!-- OPTIONAL -- shows link for french translation -->
   | it = show     <!-- OPTIONAL -- shows link for italian translation -->
   | ja = show     <!-- OPTIONAL -- shows link for japanese translation -->
   | ko = show     <!-- OPTIONAL -- shows link for korean translation -->
   | pt = show     <!-- OPTIONAL -- shows link for portuguese translation -->
   | ru = show     <!-- OPTIONAL -- shows link for russing translation -->
   | zh = show     <!-- OPTIONAL -- shows link for chinese (simplified) translation -->
}}

Categories

  • The page is added to Category:Wanted translation
  • For each requested translation language (ar, de, etc.) the page is added to "Category:Wanted translations lang"

Sample

# all languages included
{{ Google Translations | ar=show | de=show | es=show | fr=show | it=show | ja=show | ko=show | pt=show | ru=show | zh=show }}

Google-العربية-Deutsch-español-français-italiano-日本語-한국어-português-русский-中文(中国大陆)