Τρίτη, 30 Μαρτίου 2010

FLAGS TRANSLATOR

Ένας φίλος και αναγνώστης του Locus Blogus, ο Βασίλης, ζήτησε να μάθει πως γίνεται να βάλουμε μεταφραστή (translator) o οποίος να απεικονίζεται μόνο με σημαίες και να μην είναι όπως αυτός της Convey This που έχω και στην αριστερή στήλη του παρόντος ιστολογίου. Δεν είναι κάτι δύσκολο. Στην ουσία μιλάμε για ένα gadget το οποίο μπαίνει όπως και όλα τα υπόλοιπα σε ένα blog. Η διαδικασία είναι γνωστή: Μπαίνουμε στο blogspot λογαριασμό μας, από τον πανόπτη πάμε διάταξη, προσθήκη gadget και επιλέγουμε HTML/JavaScript. Εκεί κάνουμε αντιγραφή επικόλληση (copy - paste) τον παρακάτω κώδικα και πατάμε αποθήκευση (save). Ο μεταφραστής είανι ο translator της Google και στο ιστολόγιο μας θα φαίνεται όπως το παρακάτω screenshot. Καλή επιτυχία.

Ο κώδικας είναι ο εξής:

<style> .google_translate img { filter:alphaundefinedopacity=100); -moz-opacity: 1.0; opacity: 1.0; border:0; } .google_translate:hover img { filter:alphaundefinedopacity=30); -moz-opacity: 0.30; opacity: 0.30; border:0; } .google_translatextra:hover img { filter:alphaundefinedopacity=0.30); -moz-opacity: 0.30; opacity: 0.30; border:0; } </style> <div> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="English" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cen&hl=en'); return false;"><img alt="English" border="0" align="absbottom" title="English" height="24" src="http://4.bp.blogspot.com/_5jbh95HruKA/S1YVBORD9bI/AAAAAAAAACs/XkaLmmin4zg/s200/United+KingdomundefinedGreat+Britain).png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="French" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cfr&hl=en'); return false;"><img alt="French" border="0" align="absbottom" title="French" height="24" src="http://4.bp.blogspot.com/_5jbh95HruKA/S1YVBrDZLrI/AAAAAAAAAC0/Kc6eDMT9LFI/s200/France.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="German" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cde&hl=en'); return false;"><img alt="German" border="0" align="absbottom" title="German" height="24" src="http://1.bp.blogspot.com/_5jbh95HruKA/S1YVBzoFF2I/AAAAAAAAAC8/WgvMK3zP1Rk/s200/Germany.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Spain" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Ces&hl=en'); return false;"><img alt="Spain" border="0" align="absbottom" title="Spain" height="24" src="http://3.bp.blogspot.com/_5jbh95HruKA/S1YVCdHp5VI/AAAAAAAAADE/lWHzr5znExU/s200/Spain.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Italian" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cit&hl=en'); return false;"><img alt="Italian" border="0" align="absbottom" title="Italian" height="24" src="http://4.bp.blogspot.com/_5jbh95HruKA/S1YVCskNubI/AAAAAAAAADM/ChdHC6vYT4s/s200/Italy.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Dutch" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cnl&hl=en'); return false;"><img alt="Dutch" border="0" align="absbottom" title="Dutch" height="24" src="http://3.bp.blogspot.com/_5jbh95HruKA/S1YWRkFo9UI/AAAAAAAAADU/4AzKfc6Oyxg/s200/Netherlands.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Russian" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cru&hl=en'); return false;"><img alt="Russian" border="0" align="absbottom" title="Russian" height="24" src="http://4.bp.blogspot.com/_5jbh95HruKA/S1YWR-jg9pI/AAAAAAAAADc/vYZrPOzazHU/s200/Russian+Federation.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Portuguese" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cpt&hl=en'); return false;"><img alt="Portuguese" border="0" align="absbottom" title="Portuguese" height="24" src="http://1.bp.blogspot.com/_5jbh95HruKA/S1YWSGHcxOI/AAAAAAAAADk/ElHZBjDCZn8/s200/Brazil.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Japanese" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cja&hl=en'); return false;"><img alt="Japanese" border="0" align="absbottom" title="Japanese" height="24" src="http://1.bp.blogspot.com/_5jbh95HruKA/S1YWSR2_wYI/AAAAAAAAADs/GtKdPLKUluE/s200/Japan.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Korean" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Cko&hl=en'); return false;"><img alt="Korean" border="0" align="absbottom" title="Korean" height="24" src="http://2.bp.blogspot.com/_5jbh95HruKA/S1YWSrlfMyI/AAAAAAAAAD0/_MACsRIW8wg/s200/South+Korea.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Arabic" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Car&hl=en'); return false;"><img alt="Arabic" border="0" align="absbottom" title="Arabic" height="24" src="http://3.bp.blogspot.com/_5jbh95HruKA/S1YWq7SrDkI/AAAAAAAAAD8/ZE8A1isEZrw/s200/Saudi+Arabia.png" style="cursor: pointer;margin-right:8px" width="24" /></a> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Chinese Simplified" onclick="window.openundefined'http://translate.google.com/translate?u='+encodeURIComponentundefinedlocation.href)+'&langpair=auto%7Czh-CN&hl=en'); return false;"><img alt="Chinese Simplified" border="0" align="absbottom" title="Chinese Simplified" height="24" src="http://1.bp.blogspot.com/_5jbh95HruKA/S1YWrMQAw9I/AAAAAAAAAEE/r-DEVtWXp50/s200/China.png" style="cursor: pointer;margin-right:8px" width="24" /></a></div>
back to top