Template:Google Translate: Difference between revisions

From OLPC
Jump to navigation Jump to search
(pin-point google translation into english)
 
m (tweaking cosmetics & doc)
 
Line 1: Line 1:
[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair={{{lang}}}%7C{{{2|en}}}&hl={{{to|en}}}&ie=UTF-8&oe=UTF-8 {{{display|{{{to|en}}}}}}]
<includeonly>[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair={{{lang}}}%7C{{{2|en}}}&hl={{{to|en}}}&ie=UTF-8&oe=UTF-8 {{{display|{{{to|en}}}}}}]</includeonly><noinclude>
<noinclude>[[Category:Template]]
[[Category:Template]]


This template provides a simple way of making a non-english pages in the wiki available in [[english]] using Google's automatic translation. Google handles [[english]] as either the source or target language, so it's not an inter-language translation tool (the sole exception is that it can translate between [[french]] & german). The available language codes are:
This template provides a simple way of making '''non-english pages''' in the wiki available in [[english]] using Google's automatic translation. If you want to make available '''english pages''' in other languages please refer to '''[[Template:Google Translations]]'''.

Google handles [[english]] as either the source or target language, so it's not an inter-language translation tool (the sole exception is that it can translate between [[french]] & german). The available language codes are:
* ar &mdash; [[arabic language|arabic]];
* ar &mdash; [[arabic language|arabic]];
* de &mdash; german;
* de &mdash; german;
Line 13: Line 15:
* ru &mdash; [[russian]]; and
* ru &mdash; [[russian]]; and
* zh &mdash; [[chinese]] (zh-CN - simplified / zh-TW - traditional)
* zh &mdash; [[chinese]] (zh-CN - simplified / zh-TW - traditional)

Google translate
:[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair={{{1|en}}}%7C{{{2|en}}}&hl={{{2|en}}}&ie=UTF-8&oe=UTF-8 {{{2|en}}}]
::Bug: something in the wiki html grabs the top frame, so you lose google's header bar and the ability to easily cease translation.


== Usage ==
== Usage ==


<br clear="all">
{{Google Translate}}
<nowiki>{{</nowiki> Google Translate
<nowiki>{{</nowiki> Google Translate
| lang = &lt;!-- language code of the (source) page supported by Google
| lang = &lt;!-- language code of the (source) page supported by Google

Latest revision as of 14:13, 27 May 2007


This template provides a simple way of making non-english pages in the wiki available in english using Google's automatic translation. If you want to make available english pages in other languages please refer to Template:Google Translations.

Google handles english as either the source or target language, so it's not an inter-language translation tool (the sole exception is that it can translate between french & german). The available language codes are:

Usage

{{ Google Translate 
  | lang    =   <!-- language code of the (source) page supported by Google
                     (ar, de, en, es, fr, it, ja, ko, pt, ru, zh) -->
  | to      =   <!-- OPTIONAL -- target language of the Google translation (default = en)
                      NOTE: except for fr/de -> de/fr, all other translations must involve 
                            english as either source or target. -->
  | display =   <!-- OPTIONAL -- how the link presents itself, 
                     if none provided it defaults to the to language code 
                     (which itself defaults to en). -->
}}

Samples

{{Google Translate | lang = es }}

en

{{Google Translate | lang = es | to = en }}

en

{{Google Translate | lang = es | to = en | display = english }}

english

{{Google Translate | lang = es | display = english / inglés }}

english / inglés