netoops blog
Trang này chỉ copy lại để làm tài liệu cho mình thôi: Nếu có bài của bạn, thì xin bỏ qua. Cảm ơn.

Tuesday, 22 January 2013

Code Tiện Ích Chuyển Ngôn Ngữ Cho Blogs/Website


Cách 1:
1.Đăng nhập vào Blogger -> Bảng điều khiển và điều hướng đến Layout >  
2.Lưu lại và  Vào phần thiết kế (Design) -> Chọn Phần tử trang --> Thêm tiện ích -->HLTM/Java 
3. Dán toàn bộ code sau đây vào : 

<style> .google_translate img { filter:alpha(opacity=100); -moz-opacity: 1.0; opacity: 1.0; border:0; } .google_translate:hover img { filter:alpha(opacity=30); -moz-opacity: 0.30; opacity: 0.30; border:0; } .google_translatextra:hover img { filter:alpha(opacity=0.30); -moz-opacity: 0.30; opacity: 0.30; border:0; } </style><br /> <div><a class="google_translate" href="#" target="_blank" rel="nofollow" title="English" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cen&hl=en'); return false;"><img alt="English" border="0" align="absbottom" title="English" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPWvZjPU7KGda7tnq4LGoTOMPQj-d4xUyHa0OTt1Pc-FfSDIRhfCIJg3x9GlitSrGS2bhO8cY1cJRNtnSuIXA3s4ZYY8zFhze03cehO9QMtCqSw_RztXmAN2XZ4XhpXKTh2426-m0et-o/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="French" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cfr&hl=en'); return false;"><img alt="French" border="0" align="absbottom" title="French" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfLejcHcnp7ougsQVRt2SJo-9TY5UVosMaVBD2EHXug7FkIQw4m2m2gJMmCJQUbIu8EBkojwIxgO8Wucx1S2hnJMpEH-BAMwVNvZNl4Zcu-Kc1lRF5GqoVQX2TO1q-q5Y3bKVff832_iA/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="German" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cde&hl=en'); return false;"><img alt="German" border="0" align="absbottom" title="German" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-u-4HbvnRcC9VxOsnf17339bviNOc9NDAB4jjxVnqKN4taFaFSBbRLx_A8MGX8fbjaeGz-tyXZ70rEPNhviRzr4wThXYSBkBwrC4WwbYLMUiMoCtzyVJsRkxvQPCqdP-7f_LdK-6keGvm/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Spain" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Ces&hl=en'); return false;"><img alt="Spain" border="0" align="absbottom" title="Spain" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDhcuJ1dcK1Xm4vtfXP5qZhx21-DPBbC3Qvhdhf4-bpvozHWjEw__0NN4H_-Tm77laDLlOGvcxZZwQFQcN1UkmogfhV0iWsRuDhL6FHk9Lbygzu0pL3-ZUcorUwlJ4oe2VMd1NVTzNXc2N/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Italian" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cit&hl=en'); return false;"><img alt="Italian" border="0" align="absbottom" title="Italian" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcs7YdribMw2Ofe-1olKu0JgbXkOajVxjAdIjoE9c4klDGcJuFDWH9JIhO4HUzP3m4jrEnGq9tvDNRMmwLEdpz0n2JfReUj5hrf0u9GWcICVL2veumONZ3uYBHimnvlvf1JhkR4WyOR8c/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Dutch" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cnl&hl=en'); return false;"><img alt="Dutch" border="0" align="absbottom" title="Dutch" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYmaW1mkvC_sVUxTAjgEzkC6uWqKlBlOyf3Xp7NfQXUN83Gp5N1h_XiaLyLiu8J-gGN0ER9OKagSwAUTxhYnMZvF8axk4pgD0NZyWX3lp1B0PuI3ZLiqqqAO9Gl6IAvrksyvo6Frx6U38/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Russian" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cru&hl=en'); return false;"><img alt="Russian" border="0" align="absbottom" title="Russian" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioDSQORQtPS1-N6FGAKOYaB__KfEJuWPRfO85dWM5mj5swB7U6cHQoqC7tnZnsOl95nzZGTJWyQbfPo5GpyYItit3InhXo2GM_Oj0TUe5ULgUDmh7E8CdpG6bIl7MzUjqoUjsXHHuqn2s/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Portuguese" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cpt&hl=en'); return false;"><img alt="Portuguese" border="0" align="absbottom" title="Portuguese" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4pW_CqzZjNTOtM8I82FFngtsU5PvckvZ7lHacXuPTvbl8-JjEfdJtYjxi9ES2AJKc0PMbdYtPy1wjoGl6H_IwClmYAS1piAJUPsltRwCDQcKBcGmjzmK2AKqvNHBiG54-d_zufgyeKCo/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Japanese" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cja&hl=en'); return false;"><img alt="Japanese" border="0" align="absbottom" title="Japanese" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0dyprMwvwp7gP1RTq3a_qAq9xj2V5wUrXi1PprN2HoSyCxQP1bLGE7tt9KUywA4J8ImhlZ22YRubkPpM_Hf55aa_tYgMjzkWkVEgifwOc-496LVT5zGNG4sLLL8XhkhLQRVKajUHNW56K/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Korean" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Cko&hl=en'); return false;"><img alt="Korean" border="0" align="absbottom" title="Korean" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSQkDE7daFODgTXNE9WD7fGOBb9uYV_WjiXj1DILcWXAceNYCxV2MUjbvKslxBm19HjlDYOIKIVtfDTL5NNllX1IuEtD5GlLQBmkfFKmtyKwVDzuTTXq1vikkCdz72vv728TNRRmKpwak/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Arabic" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Car&hl=en'); return false;"><img alt="Arabic" border="0" align="absbottom" title="Arabic" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrQ7Vq4asGFvi0m0o7Zy5qje3TzJgEcJUxzc80FBk0HG12gMrC-IBs4N5qCxLoEHoF9v9Klac25WvyMENaN96ssEH_zns76uIAOiqoFXSBC9nCVKeMNzrrR_L9_vsNOhDIDFVmh5asWvE/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> <br /> <a class="google_translate" href="#" target="_blank" rel="nofollow" title="Chinese Simplified" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=id%7Czh-CN&hl=en'); return false;"><img alt="Chinese Simplified" border="0" align="absbottom" title="Chinese Simplified" height="32" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVHsi7HEVK39fKNp2I05aLonyKAf5lzNUiTeKVAW7NQrs6k9ot7xVOUgOH8_wnGLwxPCj0F7hMv-5QLK5HwPZ5olRRPGpshX9Og-QYh1End-kOicfOtRTbNe2lozS0wl-aZhSfzoJUPis/?imgmax=800" style="cursor: pointer;margin-right:10px" width="24"/></a><br /> </div><div style=âfont-size:10px;margin:8px 0px 3px 0pxâ>by : <a href=http://www.blogspottutorial.com/>BTF</a><br /> </div>

Cách 2: Bạn vẫn làm tương tự như trên ( Phần dịch này pro và hay hơn cách 1).

1.Đăng nhập vào Blogger -> Bảng điều khiển và điều hướng đến Layout > 
2.Lưu lại và  Vào phần thiết kế (Design) -> Chọn Phần tử trang --> Thêm tiện ích -->HLTM/Java 
3. Dán toàn bộ code sau đây vào : 
<!-- Begin TranslateThis Button for WordPress -->

<div id="translate-this"><a href="http://translateth.is/" class="translate-this-button"></a></div>

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js"></script>
<script type="text/javascript">
TranslateThis({
cookie : false,
undoText : 'Làm lại &raquo;',
panelText : 'Lựa chọn ngôn ngữ:',
moreText : 'Các ngôn ngữ khác &raquo;',
busyText : 'Đang thực hiện...',
cancelText : 'hủy thao tác',
fromLang : 'vi',
ddLangs : [
    'en',
    'vi',
],
btnImg : 'http://www.vienctt.com/language-button.png',
btnHeight : 20,
btnWidth : 49
});
</script>

<!-- End TranslateThis Button for WordPress -->

Cuối cùng là bạn lưu lại và tận hưởng nhé.

No comments:

Post a Comment

Copyright 2010 Chú ý; trang này chỉ để chủ xem.

Home | Layout | Template | Allposts | Viết |