
Google gives 3 different styles of Google Translate Widget:
1) Vertical
<div id=google_translate_element></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: en
}, google_translate_element);
}
</script><script src=//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit></script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: en
}, google_translate_element);
}
</script><script src=//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit></script>
2) Horizontal
<div id=google_translate_element></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: en,
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
}, google_translate_element);
}
</script><script src=//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit></script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: en,
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
}, google_translate_element);
}
</script><script src=//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit></script>
3) Dropdown only

<div id=google_translate_element></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: en,
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, google_translate_element);
}
</script><script src=//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit></script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: en,
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, google_translate_element);
}
</script><script src=//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit></script>
Chose which widget you like and copy the code.
1. Login to your blogger account, and open the Design section.

2. Under the Page Elements Section go to Add a Gadget.

3. From the given list find and choose HTML/JavaScript.

4. A new window will appear, paste the code there and click Save.

Your Google Translate Widget is ready. Go back and preview your blog and see how it looks. Happy Blogging!!!
0 commentaires:
Enregistrer un commentaire