Будь в курсе событий!

27.12.2013

Виджет переводчик для блогспот

Leave a Comment

Здравствуйте дорогие друзья,был немного занят оптимизацией блога. Он в последнее время тормозил непо-детски пришлось что то думать по поводу как его ускорить. И кто следит за моим блогом думаю заметил что загружаться он стал чуточку быстрее, и немного  изменился его внешний вид. Но об оптимизации я именно сейчас рассказывать не буду, я конечно улучшил поведенческое отображение блога, но еще не до конца поэтому сегодня  о простом а именно об виджете переводчик. Сегодня  на просторах интернета много решений, я предложу вам два, или три. Возможно кому нибудь пригодятся такие виджетты,ибо на ваши ресурсы дорогие мои читатели заходят люди со всего мира, и иногда такой виджет просто необходим для людей которые не владеют тем, или иным языком. И так первый виджет вы можете наблюдать сверху на скриншоте вставить его можно как в виджет HTMLjawascript  в меню дизайн, так и в Шаблон а вот сам скрипт: Сверху я отметил маркером там где можно изменить слова,или же убрать их совсем.
<h3 class="title">Перевести эту страницу-Translate This Page</h3>
<div class="widget-content">
<!-- Translate flag BEGIN -->
<style>
ul#translate-flag {padding:0;margin:0;}
#translate-flag li {list-style: none;float:left;_display:inline;padding:0;margin:1px;width:16px;height:11px;background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxb9pvCQVp7AKDbGOPISqQhbHtPh5XL5GnOAoTBVWvL9xmsX-mmiC8d239sfukTDncAZN8PLY6Lci-YhHFiVH8ijNQ_CvGdFrFulspMdwuO6e4aPalVwqMrMidm_yFKcHvwY053hErWIw/s1600/flags+sprite.png);background-repeat:no-repeat;}
#translate-flag li a{display:block;width:16px;height:11px;cursor: pointer;}
</style>
<ul id="translate-flag">
<li id="malay" style="background-position:0px 0px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|ms&amp;hl=ms'" title="Translate to Malay"></a></li>
<li id="arabic" style="background-position:0px -11px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|ar&amp;hl=ar'" title="Translate to Arabic"></a></li>
<li id="chinese" style="background-position:0px -22px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|zh-CN&amp;hl=zh-CN'" title="Translate to Chinese"></a></li>
<li id="estonia" style="background-position:0px -33px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|et&amp;hl=et'" title="Translate to Estonian"></a></li>
<li id="finnish" style="background-position:0px -44px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|fi&amp;hl=fi'" title="Translate to Finnish"></a></li>
<li id="french" style="background-position:0px -55px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|fr&amp;hl=fr'" title="Translate to French"></a></li>
<li id="german" style="background-position:0px -66px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|de&amp;hl=de'" title="Translate to German"></a></li>
<li id="greek" style="background-position:0px -77px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|el&amp;hl=el'" title="Translate to Greek" id="greek"></a></li>
<li id="hindi" style="background-position:0px -88px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|hi&amp;hl=hi'" title="Translate to Hindi"></a></li>
<li id="indonesian" style="background-position:0px -99px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|id&amp;hl=id'" title="Translate to Indonesian"></a></li>
<li id="italian" style="background-position:0px -110px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|it&amp;hl=it'" title="Translate to Italian"></a></li>
<li id="japanese" style="background-position:0px -121px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|ja&amp;hl=ja'" title="Translate to Japanese"></a></li>
<li id="persian" style="background-position:0px -132px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|fa&amp;hl=fa'" title="Translate to Persian"></a></li>
<li id="norwegian" style="background-position:0px -143px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|no&amp;hl=no'" title="Translate to Norwegian"></a></li>
<li id="portuguese" style="background-position:0px -154px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|pt&amp;hl=pt'" title="Translate to Portuguese"></a></li>
<li id="romanian" style="background-position:0px -165px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|ro&amp;hl=ro'" title="Translate to Romanian"></a></li>
<li id="russian" style="background-position:0px -176px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|ru&amp;hl=ru'" title="Translate to Russian"></a></li>
<li id="slovak" style="background-position:0px -187px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|sk&amp;hl=sk'" title="Translate to Slovak"></a></li>
<li id="spanish" style="background-position:0px -198px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|es&amp;hl=es'" title="Translate to Spanish"></a></li>
<li id="swedish" style="background-position:0px -209px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|sv&amp;hl=sv'" title="Translate to Swedish"></a></li>
<li id="thai" style="background-position:0px -231px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|th&amp;hl=th'" title="Translate to Thai"></a></li>
<li id="turkish" style="background-position:0px -242px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|tr&amp;hl=tr'" title="Translate to Turkish"></a></li>
<li id="vietnamese" style="background-position:0px -253px;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|vi&amp;hl=vi'" title="Translate to Vietnamese"></a></li>
<!-- <li id="dutch" style="background:url(http://i632.photobucket.com/albums/uu50/GreenLava/flags/nl.png) no-repeat;"><a onclick="href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=en|nl&amp;hl=nl'" title="Translate to Dutch" ></a></li> -->
</ul>
<div style="clear: both;"></div>
<!-- Translate flag END --></div>

А теперь и второй виджет на эту тематику установить его можно так же нажав на дизайн-добавить гаджет-HTMLjawascript.Внешний вид у него такой:





Скрипт установки
    <style> .translate img { filter:alpha(opacity=100); -moz-opacity: 1.0; opacity: 1.0; border:0; padding-left:0px; } .translate:hover img { filter:alpha(opacity=50); -moz-opacity: 0.50; opacity: 0.50; border:0; } </style> <div style="text-align: center;"> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cen&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="English"><img align="absbottom" alt="English" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6_T44_4LcROa-QWAUgDQCYMpY1LzYdE7VLrawS-jti3b281s-ezjekCID4L-hBQTWcfsvTzyXx6Fal1XNFsR0jFCQIlnh3lIlos2CiOQ8ZST-3GEv5XfVgH8_kOQcoZ4mYvljrsW4siW4/s144/uk-flag.png" style="cursor: pointer; margin-right: 8px;" title="English" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cfr&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="French"><img align="absbottom" alt="French" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8aMpppEEWN3c7j8xUjSudVREitzlrY0w6iYSf8LRNqxb4_Jqib_dc0_8kE3U7BJ0Y6AK1SrNlxy33gkQLM2nujf02mYExLwAtwIDn4XwfgpUyXG4acFh4mfzS6Rby5HCJCvczuAb2fjyV/s144/france-flag.png" style="cursor: pointer; margin-right: 8px;" title="French" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cde&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="German"><img align="absbottom" alt="German" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmSiuOiFIZdRieKj9WTD2cF5zi1I52kZmxxkRZhIfTBExKqQvkmf9eLd1CmPd-OGhojD1CLmW1OCFLEweYCFjYszhefVbNBiNNXZy-VLichMFAHEleTSKGmZcVHtnxSRP_w3FwOpZ-U3Mc/s144/german-flag.png" style="cursor: pointer; margin-right: 8px;" title="German" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Ces&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Spain"><img align="absbottom" alt="Spain" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHfsnH6wRdFQJuV5IAcpbVNqPGr_QRs49sCCSgIhK1Uauh9Z6nZC1hHhVxEWtrhajy8TqLWjYOG-60EVEzIb1UYOmHaZq-6y1gP4Qu2OwQPo-D7T0q4ortLCNunEE9UCKYs8bI_xoLy7qQ/s144/spain-flag.png" style="cursor: pointer; margin-right: 8px;" title="Spain" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cit&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Italian"><img align="absbottom" alt="Italian" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjlUXuEbtlpC9Eeyi-9ZoO9hyphenhyphengSiiz6EGYIFEtLVwSFSsCtn_CNRpzLWtIS0o95VxdX8JnhU-1eT9zHT5_dN1VJGa1Ed6lW_eTbRjap2oqxmPvQC74C6L40T1KwXSjkVHV-gcAObBNkDjV/s144/italy-flag.png" style="cursor: pointer; margin-right: 8px;" title="Italian" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cnl&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Dutch"><img align="absbottom" alt="Dutch" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWaJYKgHGPT7MQJPnEl8KTF1wuTsEbgK74bCY90pF1ermJWkCxqFUaYch9dFzXBHjdytDJfKMbfDSn-Y5TFD6S2xgQse3BKUjyewM7uVLcw3PNt93AqJYGMmSz2u6rymnpE4WNBQ5POGEQ/s144/dutch-flag.png" style="cursor: pointer; margin-right: 8px;" title="Dutch" width="24" /></a>
    <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cru&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Russian"><img align="absbottom" alt="Russian" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizPHM6xyflV9fmIeF2PuC7_VnDy11O8xXj-ac4_CzIBejMAwY7_p-I9D-9zZHSbem1jlsplqxCQ213gwddk59-BQJrRqpgym5LZTdvievwHj3MaJvQJyPNlYMRgjnGNekAgCkGh6llUuu1/s144/russian-flag.png" style="cursor: pointer; margin-right: 8px;" title="Russian" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cpt&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Brazil"><img align="absbottom" alt="Brazil" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv94d7ZY1Wd8HDJZ8NNURf0QMxVYYYD9ta4T2EZs1ZNzciVtWytAFLbdol1ntAEO-jt89E88wvj2H-H5TxXM2UTwoDLN61n1nM9OJMvOf_moRnXN07Ov1FUWL9k_k1N2ZndRwotUdvpACc/s144/brazil-flag.png" style="cursor: pointer; margin-right: 8px;" title="Brazilian" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cja&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Japanese"><img align="absbottom" alt="Japanese" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHFohMHKOU_LLUxetwXTN4-KgMA8DJ8up5fKRpm1IS3cawf_QJWBUke_uvNc7KD1j0U7INI6r9bB6rwdnD-0wqjM8LAPDXW_5QMCmIFNr051ssbFGO631oLqvdUqSnh3bS2ARBp1PSYgXN/s144/japan-flag.png" style="cursor: pointer; margin-right: 8px;" title="Japanese" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Cko&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Korean"><img align="absbottom" alt="Korean" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK0IqNPPC2RQjdaG_omB1xe8tp_NyCZPwCi8Q0L7RdTbjD7azyW6wzJenX0YEu_HAqPMyWNlwAYJ56tefQnVEh-Za8tKrmO0Z-RZbHz47A0tkngtBy-QDAnuw-GAHsknJBbGpXf21iTtEA/s144/korean-flag.png" style="cursor: pointer; margin-right: 8px;" title="Korean" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Car&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Arabic"><img align="absbottom" alt="Arabic" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1uUylP4ZM6gfjYF6PbGv_PIQJ7FwCcYq_-BzUfcmUO2xU5rL-HLAGQZ3ErwZsSLMT2LutBV4gDnPXgPvLHRb_oXKxXVfzNVHt31jG_Wf7VWuYhT9hzwKxI5U7b4u0XnDoPO4ivf25eAOm/s144/arab-flag.png" style="cursor: pointer; margin-right: 8px;" title="Arabic" width="24" /></a> <a class="translate" href="http://www.blogger.com/blogger.g?blogID=3662941150602065061#" onclick="window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&amp;langpair=id%7Czh-CN&amp;hl=en'); return false;" rel="nofollow" target="_blank" title="Chinese Simplified"><img align="absbottom" alt="Chinese Simplified" border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ1wlQuouLwJmPBI_QJjbR-oOK-XsEmGRfosxXPWEwk95OzprZXYPAFWfK6WV_CI9d5JbencD8UrWApDgL3iKKtPvvhs7YZNYIK-fB6Rf79z0T4aU9yyGCrBYUNVl49DWx4DP2xazZRaLs/s144/china-flag.png" style="cursor: pointer; margin-right: 8px;" title="Chinese Simplified" width="24" /></a> <div style="font-size: 9px; padding: 8px 0px 0px 0px;"></div> </div>

0 коммент. :

© 2012-2017 Cash's from program