Sunday, February 10, 2008

Make Your Blog Speak More Languages

I speak and write English (Americanised English, for you Brits). Until this weekend, my blogs were all published in English, and in English only. Thanks to the Kaspersky fiasco of Friday (Kaspersky is a Russian product), however, I was motivated to correct that shortcoming.

This was, surprisingly, an easier task than I had anticipated. If you will examine the sidebar, you will observe my multi-lingual translator, courtesy of Google Translator. It provides on the fly translation of the currently displayed web page, and whatever web pages that are subsequently loaded from following any links. It provides translation from English, to any of (as of 12/01/2009) 54 different languages. You can see the enumeration of the available languages below, in the code, or you can move the mouse over each flag, and check out the popup tags.

The translator applet code is surprisingly compact, and expandable with additional languages. It's well defined too - "<form ... > ... </form>" is the entire package. Stretch the browser window widely enough, so you can see all of the text, please. And be very careful of any gratuitous line breaks.


<form action="http://www.google.com/translate">

<script language="javascript" type="text/javascript">

<!--

document.write ("<input name=u value="+location.href+" type=hidden>")

// -->

</script>

<noscript><input value="http://cumulus.nitecruzr.net/" name="u" type="hidden"/></noscript>

<input value="en" name="hl" type="hidden"/>

<input value="UTF8" name="ie" type="hidden"/>

<input value="" name="langpair" type="hidden"/>

<input title="Catalan | Catalan - Andorra" value="en|ca"
src="http://1.bp.blogspot.com/__v4nth5_ki0/SP-fM7vwhSI/AAAAAAAAHl0/ZoZkfhEb01M/s320/Andorra+-+Catalan+-+ad_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Shqipe | Albanian " value="en|sq" src="http://3.bp.blogspot.com/_AKSZkmXmrnc/SulXteeOTLI/AAAAAAAAApU/zzVdH9EYg3Q/s320/Albania+sq_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" العربية | Arabic" value="en|ar"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/358406/gse_multipart12399.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Беларусь | Belarus" value="en|be"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/StRavKvYSqI/AAAAAAAAAic/Mf3R1Dx51CY/s320/Belarus+be_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Brasileira | Brazil | Portuguese" value="en|pt"
src="http://4.bp.blogspot.com/_AKSZkmXmrnc/StMCGF26iTI/AAAAAAAAAh0/H2FZBd1e_gw/s320/Brasil++br_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Bahasa Melayu | Malay - Brunei" value="en|ms"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/StcYJnuvsEI/AAAAAAAAAj8/-uDiw4AdYjU/s320/Brunei+bn_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" България | Bulgarian" value="en|bg"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SMiXtQx-uLI/AAAAAAAAG6I/RuLPDhnFMXY/s320/Bulgaria+-+bg_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="中文(简体)| Chinese (Simplified)" value="en|zh-CN"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/546049/gse_multipart12397.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="中文(繁体)| Chinese (Traditional)" value="en|zh-TW"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/208681/gse_multipart12398.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Hrvatska | Croatian" value="en|hr"
src="http://1.bp.blogspot.com/__v4nth5_ki0/SMhVoigYF0I/AAAAAAAAG5s/naE3NObTVZs/s400/Croatia+-+hr_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Čeština | Czech Republic " value="en|cs"
src="http://4.bp.blogspot.com/__v4nth5_ki0/SMiX9aMIL3I/AAAAAAAAG6o/4-RYadolKWQ/s320/Czech+Republic+-+cs_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Dansk | Danish" value="en|da"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SMiX9nD1NZI/AAAAAAAAG6w/ZnIBEtLIHEw/s320/Denmark+-+da_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Eesti | Estonian" value="en|et"
src="http://2.bp.blogspot.com/_AKSZkmXmrnc/StT4ASM2ZsI/AAAAAAAAAis/PmQSwtOQNLc/s320/Estonia+et_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Suomen | Finnish" value="en|fi"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SMiZwsOFndI/AAAAAAAAG8w/VlBr_zN32q8/s320/Finland+-+fi_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Français | French" value="en|fr"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/327620/gse_multipart12413.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Galitian | Galitian" value="en|gl"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/StfhOOzBp9I/AAAAAAAAAks/qinFZhMlyd8/s320/Galicia+gl_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Deutsch | German" value="en|de"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/734899/gse_multipart12400.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Ελλάς | Greek" value="en|el"
src="http://4.bp.blogspot.com/_pzC_7PLtN-0/R7CKOqA_bjI/AAAAAAAAA8A/7bmPVwaFDcQ/s320/Greek+Flag+36x24.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" עברית | Hebrew " value="en|iw"
src="http://4.bp.blogspot.com/__v4nth5_ki0/SP-fNBP-7LI/AAAAAAAAHmE/fJeA_Sbl9w4/s320/Israel+-+il_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" हिन्दी | Hindi " value="en|hi"
src="http://4.bp.blogspot.com/__v4nth5_ki0/SMiYu9muwaI/AAAAAAAAG7Y/lO6YgNdyHM4/s320/India+-+hi_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Magyarország | Hungarian" value="en|hu"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/StRtqlXKToI/AAAAAAAAAik/R38R7O52aDU/s320/Hungary+hu_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Íslande | Icelandic " value="en|is"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/SteuRylaOeI/AAAAAAAAAkc/eRI7XsLEz34/s320/Iceland+is_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Bahasa | Indonesian" value="en|id"
src="http://4.bp.blogspot.com/__v4nth5_ki0/SP-fNKvGgZI/AAAAAAAAHl8/UESh2PimM5U/s320/Indonesia+-+id_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Gaeilge | Irish " value="en|ga"
src="http://2.bp.blogspot.com/_AKSZkmXmrnc/SugR7i9pedI/AAAAAAAAAoU/HG7Sod0eQdQ/s320/Ireland+ie_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Italiano | Italian" value="en|it"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/306145/gse_multipart12401.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="日本語 | Japanese" value="en|ja"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/443122/gse_multipart12402.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Kiswahili | Kenyan " value="en|sw"
src="http://2.bp.blogspot.com/_AKSZkmXmrnc/Sugd4gdlhQI/AAAAAAAAAok/Pyselb6uWtE/s320/Kenya+ke_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="한국어 | Korean" value="en|ko"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/581031/gse_multipart12403.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Latviešu | Latvian" value="en|lv"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SP-fNX2rCXI/AAAAAAAAHmM/1LRWqh7YQBA/s320/Latvia+-+lv_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Lietuvos | Lithuanian" value="en|lt"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SP-fNrJizVI/AAAAAAAAHmU/kdaran4uffk/s320/Lithuania+-+lt_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Македонски | Macedonian " value="en|mk" src="http://1.bp.blogspot.com/_AKSZkmXmrnc/SumJcBVBZpI/AAAAAAAAApk/kY7CqDLy-Y4/s320/Macedonia+mk_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Bahasa Melayu | Bahasa Malay" value="en|ms"
src="http://4.bp.blogspot.com/_AKSZkmXmrnc/StVfgdeTNAI/AAAAAAAAAjE/7Vcnxzvy0eE/s320/Malaysia+ms_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Malti | Maltese" value="en|mt"
src="http://1.bp.blogspot.com/_AKSZkmXmrnc/StVnV4GqUAI/AAAAAAAAAjM/UUE5FAHZdyA/s320/Malta+mt_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Nederlandse | Nederlands" value="en|nl"
src="http://1.bp.blogspot.com/__v4nth5_ki0/SMiZWUAFSOI/AAAAAAAAG74/lsNT2NI_oFI/s320/Netherlands+-+nl_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Norsk | Norwegian" value="en|no"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SMiZWYWSvEI/AAAAAAAAG8A/7sOoou7far0/s320/Norway+-+no_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" فارسی | Farsi | Persian " value="en|fa"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/Sul5V-oc-6I/AAAAAAAAApc/1YIKlfK7L70/s320/Iran+fa_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Tagalog | Pilipinas " value="en|tl"
src="http://1.bp.blogspot.com/__v4nth5_ki0/SP-f7gyN2aI/AAAAAAAAHmc/x_LSaXlHtCs/s320/Pilipnas+-+ph_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Polska | Polish" value="en|pl"
src="http://2.bp.blogspot.com/_pzC_7PLtN-0/R7CAvKA_bgI/AAAAAAAAA7o/pKLqrW8EpD4/s320/Polish+Flag+36x24.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Português | Portuguese" value="en|pt"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/670301/gse_multipart12404.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Român | Romanian" value="en|ro"
src="http://3.bp.blogspot.com/_pzC_7PLtN-0/R7CAvaA_bhI/AAAAAAAAA7w/HTWQoR8M6lQ/s320/Romainian+Flag+36x24.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Русский | Russian" value="en|ru"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/111692/gse_multipart12405.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Србија | Serbian" value="en|sr"
src="http://3.bp.blogspot.com/__v4nth5_ki0/SP-f7_imioI/AAAAAAAAHmk/ytbpoyJHbmo/s320/Serbia+-+si_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Slovenčina | Slovak" value="en|sk"
src="http://4.bp.blogspot.com/__v4nth5_ki0/SP-f79KzfyI/AAAAAAAAHms/-I315jcpHN0/s320/Slovak+-+sk_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Slovenija | Slovenian" value="en|sl"
src="http://1.bp.blogspot.com/__v4nth5_ki0/SP-f8P0fwiI/AAAAAAAAHm0/Lzeh8mXiWvE/s320/Slovenia+-+si_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Afrikaans | South Africa " value="en|af"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/StLizqawtEI/AAAAAAAAAhk/aGuY6R70tNw/s320/South+Africa+af_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Español | Spanish" value="en|es"
src="http://photos1.blogger.com/x/blogger2/6075/564571464515337/1600/z/998398/gse_multipart12407.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Sverige | Swedish" value="en|sv"
src="http://1.bp.blogspot.com/__v4nth5_ki0/SMiZwrYspyI/AAAAAAAAG8o/uVUWBAyZkVc/s320/Sweden+-+se_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Kiswahili | Tanzania " value="en|sw"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/SugbcuFKJyI/AAAAAAAAAoc/8Q1rooFZtpY/s320/Tanzania+tz_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" ไทย | Thai" value="en|th"
src="http://3.bp.blogspot.com/_AKSZkmXmrnc/StKoTKbCsMI/AAAAAAAAAg8/JfICxQ5m6yk/s320/Thailand+-+th_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Türkiye | Turkish" value="en|tr"
src="http://2.bp.blogspot.com/_AKSZkmXmrnc/StLWW4Zyu6I/AAAAAAAAAhU/FU5iu_D0TLQ/s320/Turkish+-+tr_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title="Україна | Ukrainian" value="en|uk"
src="http://3.bp.blogspot.com/__v4nth5_ki0/SP-f8Bg1AMI/AAAAAAAAHm8/b4jhQQPSvj4/s320/Ukraine+-+ua_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" tiếng Việt | Vietnamese " value="en|vi"
src="http://2.bp.blogspot.com/__v4nth5_ki0/SP-gZakjpuI/AAAAAAAAHnE/fwfNZkisDOA/s320/Vietnam+-+vn_flag.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" Cymraeg | Welsh " value="en|cy"
src="http://4.bp.blogspot.com/_AKSZkmXmrnc/SugQR0g60cI/AAAAAAAAAoM/rmVA-1LvU4g/s320/Wales.png" onclick="this.form.langpair.value=this.value" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;" width="30" name="langpair"/>

<input title=" אידיש | Yiddish " src="http://3.bp.blogspot.com/_AKSZkmXmrnc/SupeM9if5gI/AAAAAAAAAp8/1gp_kA_Mhnk/s320/Yiddish_Star.png" onclick="this.form.langpair.value=this.value" value="en|yi" type="image" height="20" style="border: 1px solid rgb(21, 22, 5); padding: 3px;"width="30" name="langpair"/>

</form>

<a href="http://blogging.nitecruzr.net/2008/02/make-your-blog-speak-more-languages.html"><span style="font-weight:bold;">What Are These?</span></a>

This entry requires just 3 unique elements.
  • When you hover the mouse over the flag, you see
    العربية / Arabic
  • The definition of English to Arabic translation is
    en|ar
  • The picture of the Arabic flag, resized to 30px x 20px, in 1600 pixels resolution, is
    http://photos1.blogger.com/x/blogger2/
    6075/564571464515337/1600/z/358406/gse_multipart12399.png

Each of the other language entries, similarly, require another corresponding 3 unique elements. The array of flags are universal language symbols, that are obvious to the inhabitants of the various countries, so they need no captions.

If you want your blog to reach the world, I can't think of an easier way to encourage that to happen.
  • Add a new HTML / JavaScript gadget.
  • Highlight, Copy, then Paste the code ("<form ... > ... </form>"), exactly as presented above, directly into the Content window in the new HTML / JavaScript gadget. Do not copy anything into Notepad, or any other word processor that might have trouble with the UTF-8 character set. The code above includes UTF-8 characters, in the Asian language labels - if you try to save anything as ANSI, you will get a warning, and possible code corruption.
  • Make one simple change - correct the blog URL, to identify your blog (in this example, "myblog.blogspot.com").
    <noscript><input value="http://cumulus.nitecruzr.net/" name="u" type="hidden"/></noscript>
    change to
    <noscript><input value="http://myblog.blogspot.com/" name="u" type="hidden"/></noscript>
  • Save.
  • Test, and admire, your new world ability.

It took me several hours to write (and rewrite) this. It took me 10 minutes to set up the gadget on this blog, and 5 minutes to add this to PChuck's Network.

Having said all of that, I will note that je parle un peu de francais, and yo hablo un poco de espanol. And briefly examining (5 minutes of each) various translated pages in those two languages, I can note what I will discretely call "oddities". Both PChuck's Network and The Real Blogger Status are techie blogs, and I will bet quite heavily that not all technical terms that I use will be properly translated. But this is a start.

And next, I will note that the setup described above translates from English into other languages. If your blog is written in, let's say, French, you'll want Cumulus In Your Language. Additional languages are in progress.

For a more detailed discussion about this exciting blog accessory, see Roberto's Report: Language Translator Set-up.

For the official Google Translated Language Pairs list, see Google Translate FAQ: Language Pairs. Be advised that my applet above won't always be 100% up to date; but if you spot a new language in the Google list, that isn't in my applet, and let me know, I'll do my best to add it.

>> Top

33 comments:

C.R Jones said...

Greetings,

By coincidence I just created my own "Translate HTML" - but is not as sophisticated as this!

However I do note that cutting and pasting the above code STILL refers back to the miniflag.png's on your blogsite.

In my efforts I found that Google maintains a complete selection of world flags (ie http://www.google.com/images/flags/ar_flag.png). After a bit of head scratching I realized the flags use the International 2 letter identifiers for those countries TLD's - and not the Google TRANSLATE language codes (although in some cases they match - like Spain. It is es). As a neophye blogger I have added your resource blog to my "follow" list.

Thanks for the help. crj

http://personalqwest.blogspot.com/

Chuck said...

Welcome C.R.,

You're hitting on one of the first challenges in this project - the issue that country flags and languages won't map one to one. Some languages are shared between countries, and some countries have multiple languages.

When I want to yank Grumpy's chain (Grumpy is an Aussie), I mention "en|ae" (English translation to Aussie English). This makes him still Grumpier (LOL). Grumps is another Blog*Star, and half of this language project.

Similarly, Rose Desrochers is Canadian, and possibly Quebec Francois. The French language is common to France, to French Canadians, and to Louisana in the USA too. Each country of the world may lay claim to seeing their flag on our language toolbars.

But we'll take it one language pair at a time, for now. Thanks for your comments.

Now, let's see what this comment looks like.

RAV TUX said...

I have about four questions:

1. Where is the best place to place this in the HTML code?...before? after?

2. I want to enable both Hebrew and Arabic which both require the bi-directional text justification, where should this be placed?

3. I have a custom template that I use on both my blogs will these work on those?
reference:
http://www.ravtux.com/
http://www.lagomorphs.org/

4. Can this be added by a published Google Gadget?

Chuck said...

Rav,

1. You do NOT place this in the code - read above. You make an HTML / JavaScript gadget, and copy the code into the gadget.
2. If you want to include Arabic and Hebrew, you make sure that your template supports bi directional text justification.
3. Try it and see. If you have a layouts template, see if it will accept an HTML / JavaScript gadget, with the code above.
4. The Google Gadget idea is something that I am working on, in the back of my mind. This will happen one day, but I have no schedule for it right now.

Tony B said...

Very cool, keep up the good work

Mi-ka-El said...

I followed your instrutions above, but the translator isn't working. I get sent to the Google translate page that asks for text or webpage to be translated. I tried entering my blog's url and clicked on Translate. When the page reappears it isn't translated. I can't figure out what the problem is. Can you help.

By the way, I only found one instance of the http://blogurl that needed to be changed from yours to mine.

Chuck said...

Mi-ka,

(What nationality is that)? OK, I corrected the extra "blogurl" entry (from when I caused the coding problem noted above I think). I'm not sure what your problem is (you don't provide me a blog URL), but I'd start by making sure that there's no gratuitous line breaks in the code.

Mi-ka-El said...

Chuck,

Thanks for your reply to my previous comment. You ask what nationality Mi-ka-El is from. If you read the blog (once I get the design finished) you'll be able to find out. Would take too much space to explain here.

You also ask for the url of the blog. It is http://mi-ka-elmusings.blogspot.com. There you can try the translator gadget and see the result, which isn't working correctly. I copied the code you listed above (at this point excluding the Aribic bi-directional stuff). I tried to include in this comment the portion of the code I modified to reflect my blog's url (as I understood your instructions), but the code snippet wouldn't be accepted.

I went through the code and removed all extraneous line breaks, but that doesn't seem to be the problem. I tested the translator by clicking on the Spanish, French, German and Italian flags. However, I still get sent to the Google Translator as you should see if you test it yourself. What have I done wrong? Thanks for your help.

Also, for those whose native language is not English, it would be nice if you included an English flag (perhaps commented out until needed) with the appropriate insturctions for modifying the code to reflect the blogger's native language.

Thanks for your help.
Mike

Chuck said...

Mike,

LOL. The English flag? There is none. I live in the USA, but if I was to use a USA flag, I would piss off the Australians, the British, and a few USA citizens too (to say nothing of some "Americans"). See my comment to C.R. above for more on that subject.

I'll take a peek at your blog later today.

BTW, why don't you have a profile?

Chuck said...

Mike,

Let's try again. Recopy the code, and do not remove anything - neither content, nor line breaks. Make the one single change, as noted above, in my improved instructions.

Mi-ka-El said...

My profile? Don't you know angels don't have profiles? (lol) Actually, the blog is just being designed and I haven't gotten "that far" yet.

Let's see if I understand you correctly. I copied all of the (lengthy) code in the main post. I didn't remove anything. All I did is a) replace the "u" with my blog's url and b) went through the code and made sure the breaks were were wordwraps. You want me to copy/paste the code aain?

Chuck said...

Mike,

What I saw in your code was two places where you inserted the URL of your blog - both where it didn't belong, and one place where you left the URL of my blog - which is where the URL of your blog belonged.

So try again, re read the instructions very carefully, and re copy the code. And don't muck with the line breaks.

If it doesn't work this time, post in the BHG Broken forum, and we can go over the problem in detail. And comment back here so I know to look for your post in the forum.

marain said...

I experienced a similar problem as Mi-ka El and I solved it by going to the sidebar and with my right mouse click selecting View Source, and then searching for the "form" and copying from there until the end of the form and then pasting that into the HTML Java Script gadget and changing the URL to my blog URL. It works now. It's really beautiful and I thank you!

hackeandoelblog said...

thanks you help a lot whit this,i was looking for something like this,,

www.http://hackeandoelblog.blogspot.com/

thanks

The Fab Four said...

Excellent thank you so much!!!

Talk Pretty To Me said...

I am experiencing the same problem at Mi-ka El. I copied the code into the HTML javascript gadget and changed your URL to my URL and when I attempt to translate my blog it brings me to the google translator homepage and asks me to enter the url of the page I wish to translate. I enter my url and it still doesn't translate it.

R2K said...

This is nice :)

Elizabeth said...

thank you, will put this in my blog roll on my blog. Good work

Ligurio said...

Hi.

I copied the code to the html editor because finding a html/java gadget is not forward

When I run it it goes to google's translate page to input the page url.

I inserted my url http://www.drinkedin.blogspot.com/ as your instructions.

Melissa said...

thank you so much for this! I tried several sites and yours is the one that worked!

Skippy said...

Chuck,

Thank you for that absolutely *stellar* piece of code. Merci beaucoup!

Note to the others: I used Marain's solution above (i.e., copying the code directly from the 'View Source' screen via the web browser menu). From there, it worked perfectly, first time.

Skippy (theskippychronicles.com)

Yanti said...

Thanks so much. I tried on my blog and it works.

Xavi Garcia said...

I don't know what I am doing wrong but is not working in any way...Marain's solution neither your solution.


Can you help me?

Thanks,

Xavi.

Chuck said...

Xavi,

A problem like yours (I'm guessing, with no details provided) can be best attacked in Blogger Help Forum: How Do I?, or in Nitecruzr Dot Net - Blogging, where you can benefit from peer support.

Xavi Garcia said...

Chuck,

My problem is that when I click to Spanish flag for example it directs me to google translator but not translates my blog.

I attach link where it directs me after clicking Spanish flag...and I have followed your instructions 100%:

http://translate.google.com/?hl=en&langpair=en%7Ces#



Thanks,

Xavi.

Chuck said...

Xavi,

The "<noscript> ... </noscript>" section, when invoked, does just this.

You may need to tweak your browser, to allow scripting from the domain that your blog is published to. Check for any security programs that block or control scripts and / or cookies too.

kiwi-d said...

Hello Chuck
I get the same problem as Xavi and some others. Having pasted the script and changing only the URL, clicking on a flag just takes me to Google Translate rather than translating the page. I am publishing from a standard free blogspot domain.

Chuck said...

If clicking on a flag takes you to the Google Translator page, you have a browser security setting interfering with the assembly of the Translator URL and arguments. Or your code is corrupt.

Some diagnostic detail would be a good idea. What happens from the same button, on my blog? What's the URL of your blog? Have you tried multiple languages from your blog and from my blog?

Андрей Форекс said...

Hello! Is it possible to make translation in another page (target="_blank")? Thanks. Andrew.

Chuck said...

Andrew,

You can install this gadget on any web site that uses JavaScript. And when you are in translator mode, all web pages that you link to will be translated in the same language pair (en|ru), (ru|fr), etc.

bathmate said...

Thank you for posting.
it is really helpful to all.
such a nice topics.

Bathmate

http://tiffanyoneill.com said...

Thank you so very much for this! I had the same problem as others (redirecting to the Google translator page) until I used Marain's suggestion. Works beautifully on my blog (tiffanyoneill.blogspot.com), and now I'll try it on my own website. I'm new to blogging, and knowing there is a source of help and insight such as this is invaluable.

Tiffany

Kathryn said...

Thank you so much for this tool! I am techie illiterate, but was able to add this to my blog in a matter of minutes.

Post a Comment

Welcome to Nitecruzr Dot Net, and The Real Blogger Status. If this is your first visit here, please help me to help you, and read my commenting policy.

You can request technical assistance here - but you'll get better help in Blogger Help Forum, or in my personal forum Nitecruzr Dot Net - Blogging, where you benefit from peer support.

Do not post your email address in the body of your comment, unless you wish for it to be visible to the world.

Note if you wish to leave a comment, you'll have to enable third party cookies.