Este widget é bastante útil principalmente se o conteúdo de seu blog ou site é de interesse internacional (Qualquer pessoa no mundo pode se interessar).
Este widget funciona com a utilização do Google Translate com o qual será possível que seu visitante apenas ao clicar em uma bandeira referente ha língua modificar o idioma do site, sem complicações!
Agora vamos ao código.
Como o trabalho fica todo por conta do google, nosso único trabalho será adicionar o código html.
Vá em DESIGN e clique em adicionar um gadget, escolha a opção HTML/JavaScript e cole o seguinte código a seguir dentro:
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Czh-CN&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Chinese (Simplified) BETA">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Chinese"
src="http://lh5.ggpht.com/_mcq01yDJ2uY/Sdke4C8za2I/AAAAAAAAAkU/Mpfn_ntCweU/China.png"
title="Google-Translate-Chinese">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cfr&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to French ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to French"
src="http://lh4.ggpht.com/_mcq01yDJ2uY/SdkfGSkRgfI/AAAAAAAAAkc/X4E87SASLtA/France.png"
title="Google-Translate-Portuguese to French">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cde&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to German">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to German"
src="http://lh3.ggpht.com/_mcq01yDJ2uY/Sdke3rFjMUI/AAAAAAAAAkE/o0kR0MfngXA/Germany.png"
title="Google-Translate-Portuguese to German">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cit&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Italian">
alt="Google-Translate-Portuguese to Italian"
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
src="http://lh3.ggpht.com/_mcq01yDJ2uY/Sdke2xCmrPI/AAAAAAAAAj0/Jv14yyDo1i4/Italy.png"
title="Google-Translate-Portuguese to Italian">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cja&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Japanese BETA">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to Japanese"
src="http://lh5.ggpht.com/_mcq01yDJ2uY/Sdke3f2KbNI/AAAAAAAAAj8/xyGLFdUZbVY/Japan.png"
title="Google-Translate-Portuguese to Japanese">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cen&en=pt&en=UTF8'); return false;"
title="Google-Translate-Portuguese to English ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to English"
src="http://lh4.ggpht.com/_mcq01yDJ2uY/SdkhG4bjxqI/AAAAAAAAAks/Ws6AzZdnZTw/United%20States%20of%20America%20%28USA%29.png"
title="Google-Translate-Portuguese to English">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cru&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Russian BETA ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to Russian"
src="http://lh5.ggpht.com/_mcq01yDJ2uY/SdkfGVESWsI/AAAAAAAAAkk/-ruu99vFElQ/Russian%20Federation.png"
title="Google-Translate-Portuguese to Russian">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Ces&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Spanish ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to Spanish"
src="http://lh3.ggpht.com/_mcq01yDJ2uY/Sdke312ethI/AAAAAAAAAkM/KeACgltRc38/Spain.png"
title="Google-Translate-Portuguese to Spanish">
Este widget funciona com a utilização do Google Translate com o qual será possível que seu visitante apenas ao clicar em uma bandeira referente ha língua modificar o idioma do site, sem complicações!
Agora vamos ao código.
Como o trabalho fica todo por conta do google, nosso único trabalho será adicionar o código html.
Vá em DESIGN e clique em adicionar um gadget, escolha a opção HTML/JavaScript e cole o seguinte código a seguir dentro:
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Czh-CN&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Chinese (Simplified) BETA">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Chinese"
src="http://lh5.ggpht.com/_mcq01yDJ2uY/Sdke4C8za2I/AAAAAAAAAkU/Mpfn_ntCweU/China.png"
title="Google-Translate-Chinese">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cfr&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to French ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to French"
src="http://lh4.ggpht.com/_mcq01yDJ2uY/SdkfGSkRgfI/AAAAAAAAAkc/X4E87SASLtA/France.png"
title="Google-Translate-Portuguese to French">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cde&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to German">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to German"
src="http://lh3.ggpht.com/_mcq01yDJ2uY/Sdke3rFjMUI/AAAAAAAAAkE/o0kR0MfngXA/Germany.png"
title="Google-Translate-Portuguese to German">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cit&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Italian">
alt="Google-Translate-Portuguese to Italian"
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
src="http://lh3.ggpht.com/_mcq01yDJ2uY/Sdke2xCmrPI/AAAAAAAAAj0/Jv14yyDo1i4/Italy.png"
title="Google-Translate-Portuguese to Italian">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cja&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Japanese BETA">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to Japanese"
src="http://lh5.ggpht.com/_mcq01yDJ2uY/Sdke3f2KbNI/AAAAAAAAAj8/xyGLFdUZbVY/Japan.png"
title="Google-Translate-Portuguese to Japanese">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cen&en=pt&en=UTF8'); return false;"
title="Google-Translate-Portuguese to English ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to English"
src="http://lh4.ggpht.com/_mcq01yDJ2uY/SdkhG4bjxqI/AAAAAAAAAks/Ws6AzZdnZTw/United%20States%20of%20America%20%28USA%29.png"
title="Google-Translate-Portuguese to English">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Cru&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Russian BETA ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to Russian"
src="http://lh5.ggpht.com/_mcq01yDJ2uY/SdkfGVESWsI/AAAAAAAAAkk/-ruu99vFElQ/Russian%20Federation.png"
title="Google-Translate-Portuguese to Russian">
target="_blank" rel="nofollow"
onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=pt%7Ces&hl=pt&ie=UTF8'); return false;"
title="Google-Translate-Portuguese to Spanish ">
style="border: 0px solid ; cursor: pointer; width: 32px; height: 32px;"
alt="Google-Translate-Portuguese to Spanish"
src="http://lh3.ggpht.com/_mcq01yDJ2uY/Sdke312ethI/AAAAAAAAAkM/KeACgltRc38/Spain.png"
title="Google-Translate-Portuguese to Spanish">
Seu blog ficará disponível em chinês, francês, alemão, italiano, japonês, inglês, russo e espanhol! as principais línguas do mundo.
O resultado será este:
Fonte: Kassio Romulo
Nenhum comentário:
Postar um comentário