Nguồn kiến thức:
Sau đó sang Phần tử trang>>tạo 1 widget HTML với nội dung sau:
Chú ý: Thủ thuật này đụng code với lightbox.
- Code:
http://huynh-nhat-ha.blogspot.com
- Code:
<script src='http://huynhatha.googlecode.com/files/jquery.js' type='text/javascript'/>
<script src='http://huynhatha.googlecode.com/files/jquery-translate.js' type='text/javascript'/>
Sau đó sang Phần tử trang>>tạo 1 widget HTML với nội dung sau:
- Code:
<script type="text/javascript">
//<![CDATA[
if(jQuery.cookie('glang') && jQuery.cookie('glang') != 'vi') jQuery(function($){$('body').translate('vi', $.cookie('glang'), {toggle:true});});
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
function doTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;var lang=lang_pair.split('|')[1];if(lang=='pt')lang='pt-PT';jQuery.cookie('glang', lang);jQuery(function($){$('body').translate('vi', lang, {toggle:true});});}
//]]>
</script>
<center>
<a href="javascript:doTranslate('vi|vi')" title="Vietnamese"><img src="http://img267.imageshack.us/img267/945/vietnamvnflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Vietnamese" /></a>
<a href="javascript:doTranslate('vi|en')" title="English"><img src="http://img34.imageshack.us/img34/6620/englishflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="English" /></a>
<a href="javascript:doTranslate('vi|ar')" title="Arabic"><img src="http://img411.imageshack.us/img411/6620/arabicflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Arabic" /></a>
<a href="javascript:doTranslate('vi|zh-CN')" title="Chinese (Simplified)"><img src="http://img802.imageshack.us/img802/5194/chineseflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Chinese (Simplified)" /></a>
<a href="javascript:doTranslate('vi|ja')" title="Japanese"><img src="http://img23.imageshack.us/img23/7841/japaneseflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Japanese" /></a>
<a href="javascript:doTranslate('vi|ko')" title="Korean"><img src="http://img233.imageshack.us/img233/6923/koreanflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Korean" /></a>
<a href="javascript:doTranslate('vi|fr')" title="French"><img src="http://img573.imageshack.us/img573/8866/frenchflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="French" /></a>
<a href="javascript:doTranslate('vi|de')" title="German"><img src="http://img262.imageshack.us/img262/6708/germanflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="German" /></a>
<a href="javascript:doTranslate('vi|pt')" title="Portuguese"><img src="http://img18.imageshack.us/img18/6102/portugueseflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Portuguese" /></a>
<a href="javascript:doTranslate('vi|es')" title="Spanish"><img src="http://img63.imageshack.us/img63/2487/spanishflag.png" height="18" width="24" style="border:0;vertical-align:top;" alt="Spanish" /></a>
</center>
- Code:
http://dl.dropbox.com/u/15035900/CPResources/Blog/translate/translate.7z hoặc http://adf.ly/HgOt
Chú ý: Thủ thuật này đụng code với lightbox.
- Code:
Viết bởi: Eagle8x - diendan.chinhphuc.info