Template:Google Translations: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (tweak - finished?)
m (finished tweaking)
Line 1: Line 1:
<span class="plainlinks">{{{title|Google}}}<span style="display:{{{ar|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Car&hl=en&ie=UTF-8&oe=UTF-8 ar]</span><span style="display:{{{de|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cde&hl=en&ie=UTF-8&oe=UTF-8 de]</span><span style="display:{{{es|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Ces&hl=en&ie=UTF-8&oe=UTF-8 es]</span><span style="display:{{{fr|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8 fr]</span><span style="display:{{{it|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cit&hl=en&ie=UTF-8&oe=UTF-8 it]</span><span style="display:{{{ja|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cja&hl=en&ie=UTF-8&oe=UTF-8 ja]</span><span style="display:{{{ko|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cko&hl=en&ie=UTF-8&oe=UTF-8 ko]</span><span style="display:{{{pt|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cpt&hl=en&ie=UTF-8&oe=UTF-8 pt]</span><span style="display:{{{ru|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cru&hl=en&ie=UTF-8&oe=UTF-8 ru]</span><span style="display:{{{zh-CN|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Czh-CN&hl=en&ie=UTF-8&oe=UTF-8 zh-CN]</span></span><noinclude>
<span class="plainlinks">{{{title|Google}}}
<span style="display:{{{ar|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Car&hl=en&ie=UTF-8&oe=UTF-8 ar]</span>
<span style="display:{{{de|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cde&hl=en&ie=UTF-8&oe=UTF-8 de]</span>
<span style="display:{{{es|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Ces&hl=en&ie=UTF-8&oe=UTF-8 es]</span>
<span style="display:{{{fr|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8 fr]</span>
<span style="display:{{{it|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cit&hl=en&ie=UTF-8&oe=UTF-8 it]</span>
<span style="display:{{{ja|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cja&hl=en&ie=UTF-8&oe=UTF-8 ja]</span>
<span style="display:{{{ko|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cko&hl=en&ie=UTF-8&oe=UTF-8 ko]</span>
<span style="display:{{{pt|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cpt&hl=en&ie=UTF-8&oe=UTF-8 pt]</span>
<span style="display:{{{ru|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cru&hl=en&ie=UTF-8&oe=UTF-8 ru]</span>
<span style="display:{{{zh-CN|inline}}}">/[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Czh-CN&hl=en&ie=UTF-8&oe=UTF-8 zh-CN]</span></span><noinclude>


----
----
Line 37: Line 27:
| ja = ''none'' &lt;!-- OPTIONAL -- hides link for japanese translation; --&gt;
| ja = ''none'' &lt;!-- OPTIONAL -- hides link for japanese translation; --&gt;
| ko = ''none'' &lt;!-- OPTIONAL -- hides link for korean translation; --&gt;
| ko = ''none'' &lt;!-- OPTIONAL -- hides link for korean translation; --&gt;
| pt = ''none'' &lt;!-- OPTIONAL -- hides link for portuguese translation; --&gt;
| ru = ''none'' &lt;!-- OPTIONAL -- hides link for russing translation; --&gt;
| ru = ''none'' &lt;!-- OPTIONAL -- hides link for russing translation; --&gt;
| zh-CN = ''none'' &lt;!-- OPTIONAL -- hides link for chinese (simplified) translation --&gt;
| zh-CN = ''none'' &lt;!-- OPTIONAL -- hides link for chinese (simplified) translation --&gt;
Line 46: Line 37:
<nowiki>{{</nowiki> Google Translations <nowiki>}}</nowiki>
<nowiki>{{</nowiki> Google Translations <nowiki>}}</nowiki>
{{Google Translations}}
{{Google Translations}}
# all languages except ar (arabic), de (german) nor es (spanish)
# all languages except ar (arabic), de (german), es (spanish), fr (french) nor it (italian)
<nowiki>{{</nowiki> Google Translations | ar = none | de = none | es = none <nowiki>}}</nowiki>
<nowiki>{{</nowiki> Google Translations | ar = none | de = none | es = none | fr = none | it = none <nowiki>}}</nowiki>
{{Google Translations | ar = none | de = none | es = none }}
{{Google Translations | ar = none | de = none | es = none | fr = none | it = none }}
# all languages except fr (french), it (italian) nor ja (japanese)
# all languages except ja (japanese), ko (korean), pt (portuguese), ru (russian) nor zh-CN (chinese simplified)
<nowiki>{{</nowiki> Google Translations | fr = none | it = none | ja = none <nowiki>}}</nowiki>
<nowiki>{{</nowiki> Google Translations | ja = none | ko = none | pt = none | ru = none | zh-CN = none <nowiki>}}</nowiki>
{{Google Translations | fr = none | it = none | ja = none }}
{{Google Translations | ja = none | ko = none | pt = none | ru = none | zh-CN = none }}
# with title 'Via Google' and all languages except ko (korean), ru (russian) nor zh-CN (chinese simplified)
# with title 'Automatic translations:' and all languages included
<nowiki>{{</nowiki> Google Translations | title = Via Google | ko = none | ru = none | zh-CN = none <nowiki>}}</nowiki>
<nowiki>{{</nowiki> Google Translations | title = Automatic translations: <nowiki>}}</nowiki>
{{Google Translations | title = Via Google | ko = none | ru = none | zh-CN = none }}
{{Google Translations | title = Automatic translations: }}
# No 'title' and all languages except ar (arabic), fr (french) nor ko (korean)
# No 'title' and all languages included
<nowiki>{{</nowiki> Google Translations | title =| ar = none | fr = none | ko = none <nowiki>}}</nowiki>
<nowiki>{{</nowiki> Google Translations | title =<nowiki>}}</nowiki>
{{Google Translations | title =| ja = none | ko = none }}
{{Google Translations | title =}}


[[Category:Template]]</noinclude>
[[Category:Template]]</noinclude>

Revision as of 15:13, 26 May 2007

Google/ar/de/es/fr/it/ja/ko/pt/ru/zh-CN


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

Usage

In order to 'hide' some languages from the list (for example when there's a human translation available) you may specify for each language code "none" and will not be included.

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

Sample

# all languages included
{{ Google Translations }}

Google/ar/de/es/fr/it/ja/ko/pt/ru/zh-CN

# all languages except ar (arabic), de (german), es (spanish), fr (french) nor it (italian)
{{ Google Translations | ar = none | de = none | es = none | fr = none | it = none }}

Google/ar/de/es/fr/it/ja/ko/pt/ru/zh-CN

# all languages except ja (japanese), ko (korean), pt (portuguese), ru (russian) nor zh-CN (chinese simplified)
{{ Google Translations | ja = none | ko = none | pt = none | ru = none | zh-CN = none }}

Google/ar/de/es/fr/it/ja/ko/pt/ru/zh-CN

# with title 'Automatic translations:' and all languages included 
{{ Google Translations | title = Automatic translations: }}

Automatic translations:/ar/de/es/fr/it/ja/ko/pt/ru/zh-CN

# No 'title' and all languages included
{{ Google Translations | title =}}

/ar/de/es/fr/it/ja/ko/pt/ru/zh-CN