Difference between revisions of "Template:Google translation link"

From World Naked Bike Ride
Jump to: navigation, search
m (fix syntax)
(Tooltip for default 'en' and most languages that would be passed as parameter. Note: Maybe unlike Google Translate, the wiki software can't recognize e.g. 'es-419' and the tooltip bluntly repeats the code instead of clarifying 'español latinoamericano'.)
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" 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
 
  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;">{{{1|<span title="English">en</span>}}}</span>&#8201;<span
+
  style="font-size:110%;font-variant:normal;font-weight:700;"><span title="{{#language:{{{1|en}}}}}">{{{1|en}}}</span></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 <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 ''<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 ''<span lang="en" translate="no">to</span>''&#8202;</span>&#8201;or&#8201;<span
Line 128: Line 128:
 
''The language codes recognized by the <span translate="no">[http://translate.google.com/ Google Translate application]</span>, generally follow the ISO 639-1 standard (e.g. '<span translate="no">en</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 <span translate="no">[http://translate.google.com/ Google Translate application]</span>, generally follow the ISO 639-1 standard (e.g. '<span translate="no">en</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>].''
  
''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.''
+
''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
 +
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 Google); else it simply repeats the code.''
  
 
''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 <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">en</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>''xx''<nowiki>}}</nowiki></span> ''in which '<span translate="no">xx</span>' is to be the ISO 639-1 code (exceptionally with regional suffix) of the (or a) language in the calling page. It does not need to be one of the template, which thus allows easily preparing a ride at a new location of which Google recognizes the code for whatever local language.''</div>
 
''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 <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">en</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>''xx''<nowiki>}}</nowiki></span> ''in which '<span translate="no">xx</span>' is to be the ISO 639-1 code (exceptionally with regional suffix) of the (or a) language in the calling page. It does not need to be one of the template, which thus allows easily preparing a ride at a new location of which Google recognizes the code for whatever local language.''</div>
 
[[Category:Templates|{{PAGENAME}}]]</noinclude>
 
[[Category:Templates|{{PAGENAME}}]]</noinclude>

Revision as of 08:19, 18 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: 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

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. 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.

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:
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 the (or a) language in the calling page. It does not need to be one of the template, which thus allows easily preparing a ride at a new location of which Google recognizes the code for whatever local language.