Difference between revisions of "Template:Google translation link"

From World Naked Bike Ride
Jump to: navigation, search
m (Done.)
(Google specific method for translation control by class [also for aurally spelling characters] (Html 5 method in place: users may see the presentation via their own translation tool). Detailed how to use the template once it's called in a page.)
Line 1: Line 1:
<p class="plainlinks" lang="en" translate="no" style="line-height:1.25em;margin-top:-.17em;margin-bottom:.13em;font-family:Arial,Helvetica,sans-serif;font-size:.75em;"><span
+
<p class="plainlinks notranslate" translate="no" lang="en" style="line-height:1.25em;margin-top:-.17em;margin-bottom:.13em;font-family:Arial,Helvetica,sans-serif;font-size:.75em;"><span
 
  style="font-variant:small-caps;font-weight:100;color:#55a;white-space:nowrap;">[[Template:Google translation link|<span style="font-weight:100;">Google translate</span>]] <span
 
  style="font-variant:small-caps;font-weight:100;color:#55a;white-space:nowrap;">[[Template:Google translation link|<span style="font-weight:100;">Google translate</span>]] <span
 
  style="font-size:110%;font-variant:normal;font-weight:700;" title="{{#language:{{{2|{{{1|en}}}}}}}}">{{{1|en}}}</span>&#8201;<span
 
  style="font-size:110%;font-variant:normal;font-weight:700;" title="{{#language:{{{2|{{{1|en}}}}}}}}">{{{1|en}}}</span>&#8201;<span
  style="background-color:#def;">&#8202;page <span lang="en" translate="no">to</span>&#8202;</span>&#8201;(or&#8201;<span
+
  style="background-color:#def;">&#8202;page to&#8202;</span>&#8201;(or&#8201;<span
  style="display:inline-block;line-height:.66em;padding-top:0;padding-bottom:.18em;background-color:#ddd;">&#8202;text ''<span lang="en" translate="no">to</span>''&#8202;</span>&#8201;or&#8201;<span
+
  style="display:inline-block;line-height:.66em;padding-top:0;padding-bottom:.18em;background-color:#ddd;">&#8202;text ''to''&#8202;</span>&#8201;or&#8201;<span
  style="display:inline-block;line-height:.66em;padding-top:0;padding-bottom:.18em;background-color:#adb;">&#8202;''<span lang="en" translate="no">from</span>''&#8202;</span>&#8202;):</span> <!--space: IE would treat &#8202; here as if non breaking--><span
+
  style="display:inline-block;line-height:.66em;padding-top:0;padding-bottom:.18em;background-color:#adb;">&#8202;''from''&#8202;</span>&#8202;):</span> <!--space: IE would treat &#8202; here as if non breaking--><span
 
  style="display:inline-block;font-weight:700;"><!--
 
  style="display:inline-block;font-weight:700;"><!--
 
--LANG#1--><span style="white-space:nowrap;" lang="{{{1|en}}}" TITLE="Afrikaans"><!--
 
--LANG#1--><span style="white-space:nowrap;" lang="{{{1|en}}}" TITLE="Afrikaans"><!--
Line 106: Line 106:
 
-->[http://translate.google.com/translate?sl={{{1|en}}}&tl=zh-TW <span style="color:#ddd;">■</span>]<!--
 
-->[http://translate.google.com/translate?sl={{{1|en}}}&tl=zh-TW <span style="color:#ddd;">■</span>]<!--
 
-->[http://translate.google.com/translate?sl=zh-TW&tl={{{1|en}}} <span style="color:#adb;">■</span>]</span><!--
 
-->[http://translate.google.com/translate?sl=zh-TW&tl={{{1|en}}} <span style="color:#adb;">■</span>]</span><!--
--></span></p><noinclude><div lang="{{{1|en}}}" translate="yes"><div style="display:none;"><nowiki>
+
--></span></p><noinclude><div class="translate" translate="yes" lang="{{{1|en}}}"><div style="display:none;"><nowiki>
 
Template edit information:
 
Template edit information:
  
Line 127: Line 127:
  
 
</nowiki></div><hr>
 
</nowiki></div><hr>
<span lang="en" style="display:inline-block;font-size:88%;font-weight:700;margin-bottom:.75em;"><span style="font-variant:small-caps;letter-spacing:.3ex;padding:.18em 1ex .15em 1ex;color:gold;background-color:gray;">User manual</span><span translate="no" style="padding:.18em .6ex .15em .8ex;background-color:gold;">To put the ''English'' text hereunder in another language, click its 2-character code in the above series.</span></span><br />
+
<span style="display:inline-block;font-size:88%;font-weight:700;margin-bottom:.75em;"><span style="font-variant:small-caps;letter-spacing:.3ex;padding:.18em 1ex .15em 1ex;color:gold;background-color:gray;">User manual</span><span style="padding:.18em .6ex .15em .8ex;background-color:gold;">To put the ''English'' text hereunder in another language, click its 2-character code in the above series.</span></span><br />
'''''The language codes''' recognized by the [http://translate.google.com/ <span translate="no">Google Translate</span> application], generally follow the <span translate="no">ISO 639-1</span> standard (e.g. '<span translate="no">e&zwj;n</span>' for English), for only a few special cases with a region identifier suffix (e.g. '<span translate="no">zh-CN</span>' and '<span translate="no">zh-TW</span>') — see [http://sites.google.com/site/tomihasa/google-language-codes Google's list of <span lang="en" translate="no">Web Interface Language Codes</span>].''
+
'''''The language codes''' recognized by the [http://translate.google.com/ <span class="notranslate" translate="no" lang="en">Google Translate</span> application], generally follow the <span class="notranslate" translate="no">ISO 639-1</span> standard (e.g. 'e<span class="notranslate" translate="no">&zwj;</span>n' for English), for only a few special cases with a region identifier suffix (e.g. '<span class="notranslate" translate="no">zh-CN</span>' and '<span class="notranslate" translate="no">zh-TW</span>') — see [http://sites.google.com/site/tomihasa/google-language-codes <span class="notranslate" translate="no" lang="en">Google</span>'s list of <span class="notranslate" translate="no" lang="en">Web Interface Language Codes</span>].''
  
'''''This template''' lists only languages of considerable international importance, and the ones of locations where a ride ever took place (or recently became proposed). Merely pointing at a code in the series, shows the relevant language name written in that language (and in English); a click on either of its 3 tiny items, launches the proper translator. Pointing at the code immediately behind'' '<span translate="no"
+
'''''This template''' lists only languages of considerable international importance, and the ones of locations where a ride ever took place (or recently became proposed). Merely pointing at a code in the series, shows the relevant language name written in that language (and in English); a click on either of its 3 tiny items, launches the proper translator: <u>To this language</u>, the&#8201;<span style="background-color:#def;">&#8202;blueish code&#8202;</span>&#8201;shows the whole page with (at least) the parts that were written in the language corresponding to the code immediately behind'' '<span class="notranslate" translate="no"
  style="font-family:Arial,Helvetica,sans-serif;font-size:0.86em;font-variant:small-caps;font-weight:100;">Google&nbsp;translate</span>' ''shows thát language name (only in that language), provided it is known to this wiki's software (which is independent from <span translate="no">Google</span>); else it simply repeats the code. Only upon noticing this imperfection, ideally the name of that language in that language should be passed as an extra parameter, to be shown as the tooltip.''
+
style="font-family:Arial,Helvetica,sans-serif;font-size:0.86em;font-variant:small-caps;font-weight:100;">Google&nbsp;translate</span>' ''translated, the&#8201;<span style="background-color:#ddd;">&#8202;gray square&#8202;</span>&#8201;prepares <span class="notranslate" translate="no" lang="en">Google</span> for letting you either paste a beforehand copied selection, or type a text, and get it translated; for this same method but <u>from this language</u>, use the&#8201;<span style="background-color:#adb;">&#8202;green square&#8202;</span>. Pointing at the code immediately behind'' '<span class="notranslate" translate="no"
 +
  style="font-family:Arial,Helvetica,sans-serif;font-size:0.86em;font-variant:small-caps;font-weight:100;">Google&nbsp;translate</span>' ''shows thát language name (only in that language), provided it is known to this wiki's software (which is independent from <span class="notranslate" translate="no">Google</span>); else it simply repeats the code. Only upon noticing this imperfection, ideally the name of that language in that language should be passed as an extra parameter, to be shown as the tooltip.''
  
''<span lang="en" translate="yes" style="font-size:700;"><!--trick for Google-->'''Calling the template'''</span> from near the top of (or elsewhere in) a page, facilitates its translation, or such of a to be copy/pasted section. The <span translate="no" style="font-family:Arial,Helvetica,sans-serif;font-size:0.86em;font-variant:small-caps;font-weight:100;">&#8202;from&#8202;</span> link&nbsp;<span style="color:#adb;">■</span> of one's native language may assist editing a page written in another language. Syntax:<br />1)'' <span lang="en" translate="no"><nowiki>{{Google translation link}}</nowiki></span> ''which assumes an '<span translate="no">e&zwj;n</span>' page (i.e. the calling page is at least partially written in English)<br />2)'' <span lang="en" translate="no"><nowiki>{{Google translation link|</nowiki>''x&zwj;x''<nowiki>}}</nowiki></span> ''in which '<span translate="no">x&zwj;x</span>' is to be the <span translate="no">ISO 639-1</span> code (exceptionally with regional suffix) of a (or the only) language in the calling page. It may be, but does not need to be one from the constant series of the template, and thus allows easily preparing a ride at a new location of which Google recognizes the code for whatever local language.<br />3)'' <span lang="en" translate="no"><nowiki>{{Google translation link|</nowiki>''xx''|''Xxx Xxx''<nowiki>}}</nowiki></span> ''in which '<span translate="no">X&zwj;x&zwj;x&nbsp;X&zwj;x&zwj;x</span>' is to be the name of the language corresponding to the by this wiki not recognized code, in full written in the characters and spelling of this language. This extended 3rd syntax is most exceptional, see higher.''</div>
+
''<span class="translate" translate="yes" style="font-size:700;" lang="{{{1|en}}}"><!--trick for Google to keep together-->'''Calling the template'''</span> from near the top of (or elsewhere in) a page, facilitates its translation, or such of a to be copy/pasted section. The <span class="notranslate" translate="no" style="font-family:Arial,Helvetica,sans-serif;font-size:0.86em;font-variant:small-caps;font-weight:100;">&#8202;from&#8202;</span> link&nbsp;<span style="color:#adb;">■</span> of one's native language may assist editing a page written in another language. '''Syntax''' (One may concatenate several calls, without any <span style="color:green;" title="Hypertext markup language (typical for internet pages)">Html</span> or wiki markup)''':'''<br />1)'' <span class="notranslate" translate="no" lang="en"><nowiki>{{Google translation link}}</nowiki></span> ''which assumes an 'e<span class="notranslate" translate="no">&zwj;</span>n' page (i.e. the calling page is at least partially written in English)<br />2)'' <span class="notranslate" translate="no" lang="en"><nowiki>{{Google translation link|</nowiki>''<span class="translate" translate="yes">x</span>&zwj;<span class="translate" translate="yes">x</span>''<nowiki>}}</nowiki></span> ''in which 'x<span class="notranslate" translate="no">&zwj;</span>x' is to be the <span class="notranslate" translate="no">ISO 639-1</span> code (exceptionally with regional suffix) of a (or the only) language in the calling page. It may be, but does not need to be one from the constant series of the template, and thus allows easily preparing a ride at a new location of which Google recognizes the code for whatever local language.<br />3)'' <span class="notranslate" translate="no" lang="en"><nowiki>{{Google translation link|</nowiki>''<span class="translate" translate="yes">x</span>&zwj;<span class="translate" translate="yes">x</span>''|''<span class="translate" translate="yes">X</span>&zwj;<span class="translate" translate="yes">x</span>&zwj;<span class="translate" translate="yes">x</span> <span class="translate" translate="yes">X</span>&zwj;<span class="translate" translate="yes">x</span>&zwj;<span class="translate" translate="yes">x</span>''<nowiki>}}</nowiki></span> ''in which 'X<span class="notranslate" translate="no">&zwj;</span>x<span class="notranslate" translate="no">&zwj;</span>x&nbsp;X<span class="notranslate" translate="no">&zwj;</span>x<span class="notranslate" translate="no">&zwj;</span>x' is to be the name of the language corresponding to the by this wiki not recognized code, in full written in the characters and spelling of this language. This extended 3rd syntax is most exceptional, see higher. Utter perfectionists however, might as well apply it to force also in this tooltip both its autochthonal [at their responsibility] and between parentheses its English name.''</div>
 
[[Category:Templates|{{PAGENAME}}]]</noinclude>
 
[[Category:Templates|{{PAGENAME}}]]</noinclude>

Revision as of 05:31, 21 April 2020

Template edit information: * Dismissed: TITLE="Magyar (Hungarian)" hu - Probably no intended ride(s) at Budapest took place, none recently proposed TITLE="עברית (Hebrew)" iw - No intended ride(s) at Tel Aviv took place, none recently proposed TITLE="Latviešu (Latvian)" lv - Probably no intended ride(s) at Riga took place, none recently proposed TITLE="Polski (Polish)" pl - Probably no intended ride(s) at Krakau took place, none recently proposed TITLE="Svenska (Swedish)" sv - No solicited ride(s) at Stockholm took place, none recently proposed * Maintenance: Do your editing at widest window and set a small character size (e.g. in Firefox a few times CTRL - ) Each language starts with its TITLE="<language name>" line and ends immediately above such of the next language: Easy to copy/paste, replace that <language name> and on each of the following 4 lines replace the quickly spotted language code with the one of the new language. In the series of language blocks, only the very first one starts with '--LANG#1--><span ' instead of '-->| <span ' and all end with '</span><!--' * Google syntax: - to translate a web page: http://translate.google.com/translate?u=URL&sl=FROMLANG&tl=TOLANG - to allow user (editor) pasting or typing a to be translated text: 1) works when manually entered in a browser, but fails to set proper languages when launched from a linking page (until the user sets the cursor in the browser address bar behind this passed on url and presses Enter): translate.google.com#FROMLANG|TOLANG or translate.google.com/#FROMLANG|TOLANG 2) http://translate.google.com/translate?sl=FROMLANG&tl=TOLANG

User manualTo put the English text hereunder in another language, click its 2-character code in the above series.
The language codes recognized by the Google Translate application, generally follow the ISO 639-1 standard (e.g. 'en' for English), for only a few special cases with a region identifier suffix (e.g. 'zh-CN' and 'zh-TW') — see Google's list of Web Interface Language Codes.

This template lists only languages of considerable international importance, and the ones of locations where a ride ever took place (or recently became proposed). Merely pointing at a code in the series, shows the relevant language name written in that language (and in English); a click on either of its 3 tiny items, launches the proper translator: To this language, the  blueish code  shows the whole page with (at least) the parts that were written in the language corresponding to the code immediately behind 'Google translate' translated, the  gray square  prepares Google for letting you either paste a beforehand copied selection, or type a text, and get it translated; for this same method but from this language, use the  green square . Pointing at the code immediately behind 'Google translate' shows thát language name (only in that language), provided it is known to this wiki's software (which is independent from Google); else it simply repeats the code. Only upon noticing this imperfection, ideally the name of that language in that language should be passed as an extra parameter, to be shown as the tooltip.

Calling the template from near the top of (or elsewhere in) a page, facilitates its translation, or such of a to be copy/pasted section. The  from  link  of one's native language may assist editing a page written in another language. Syntax (One may concatenate several calls, without any Html or wiki markup):
1)
{{Google translation link}} which assumes an 'en' page (i.e. the calling page is at least partially written in English)
2)
{{Google translation link|xx}} in which 'xx' is to be the ISO 639-1 code (exceptionally with regional suffix) of a (or the only) language in the calling page. It may be, but does not need to be one from the constant series of the template, and thus allows easily preparing a ride at a new location of which Google recognizes the code for whatever local language.
3)
{{Google translation link|xx|Xxx Xxx}} in which 'Xxx Xxx' is to be the name of the language corresponding to the by this wiki not recognized code, in full written in the characters and spelling of this language. This extended 3rd syntax is most exceptional, see higher. Utter perfectionists however, might as well apply it to force also in this tooltip both its autochthonal [at their responsibility] and between parentheses its English name.