Đăng ký

Đăng nhập

Nếu bạn chưa đăng nhập thành công, hãy kiểm tra Email đăng ký để kích hoạt tài khoản, hoặc gọi 0984301897

Forgot Password

Quên mật khẩu? Hãy điền địa chỉ email của bạn. Bạn sẽ nhận được một liên kết và sẽ tạo một mật khẩu mới qua email.

Kiều nữu cặp với đại gia vì gì ( tiền )

Vui lòng nhập tên người dùng của bạn.

Please type your E-Mail.

Vui lòng chọn một tiêu đề thích hợp cho câu hỏi để nó có thể được trả lời dễ dàng.

Chọn danh mục đúng với nội dung câu hỏi được đăng tải

Điền từ khoá phù hợp với nội dung câu hỏi, ví dụ :tại sao đói, làm cách nào nhiều tiền.

Nội dung càng chi tiết càng tốt

Choose from here the video type.

Put Video ID here: https://www.youtube.com/watch?v=sdUUx5FdySs Ex: "sdUUx5FdySs".

Kiều nữu cặp với đại gia vì gì ( tiền )

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Thêm Google Translate tùy chỉnh vào blogspot/blogger

Cần sửa lỗi google dịch tùy chỉnh trên blogger do tiện ích google dịch cực nhẹ hiện nay đã bị lỗi trên một số trình duyệt do có sự thay đổi của google. Trong khi google dịch là tương đối cần thiết đối với các website/blogger, mặc dù trên các phương tiện lướt web cũng đã có chức năng dịch nhưng với Google Translate tích hợp ngay trên web/blog sẽ là điều tiện lợi hơn.

Thêm tiện ích Google Translate tùy chỉnh vào blogspot/blogger

Tại sao nên thêm Google Translator vào Blogger

Giả sử nếu blog của bạn được đọc ở nhiều quốc gia thì việc dịch nội dung bài đăng trên blog của bạn sang ngôn ngữ mẹ đẻ của họ sẽ hữu ích cho độc giả nước ngoài. Bằng cách thêm tiện ích dịch của Google vào blog của bạn, người đọc có thể chuyển từ ngôn ngữ này sang ngôn ngữ khác ngay lập tức.

Thêm tiện ích dịch của Google vào Blogger

Để đưa Google Translator vào Blog của bạn, trước tiên hãy tạo bản sao lưu mẫu hiện tại của bạn để nếu có bất kỳ lỗi nào xảy ra, thì bạn có thể khôi phục blog của mình bằng mẫu đã sao lưu.

Google Dịch Trong Blogger

    • Mở Bảng điều khiển Blogger
    • Phần chủ đề Goto
    • Sao lưu mẫu của bạn (Quan trọng)
    • Bấm vào Chỉnh sửa HTML
    • Nhập đoạn mã sau trước khi đóng thẻ </style>
Sau đây là hướng dẫn thêm Google Translate tùy chỉnh vào blogspot/blogger đã có chỉnh sửa lỗi như đã nói ở trên. Để thêm Google dịch vào blogger ta cần tiến hành theo 3 bước.
/* Google Translator */ 
#googleTranslateit{padding:0;margin-right:5px} .goog-te-banner-frame.skiptranslate,.goog-te-gadget-simple img,img.goog-te-gadget-icon,.goog-te-menu-value span{display:none!important} .goog-te-menu-frame{box-shadow:none!important} .goog-te-gadget-simple{background-color:transparent!important;background:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg style='fill:none;stroke:%23262d3d;stroke-linecap:round;stroke-linejoin:round'%3E%3Cpath d='M.5,2V18A1.5,1.5,0,0,0,2,19.5H17L10.5.5H2A1.5,1.5,0,0,0,.5,2Z' /%3E%3Cpath d='M12,4.5H22A1.5,1.5,0,0,1,23.5,6V22A1.5,1.5,0,0,1,22,23.5H13.5l-1.5-4' /%3E%3Cline x1='17' x2='13.5' y1='19.5' y2='23.5' /%3E%3Cline x1='14.5' x2='21.5' y1='10.5' y2='10.5' /%3E%3Cline x1='17.5' x2='17.5' y1='9.5' y2='10.5' /%3E%3Cpath d='M20,10.5c0,1.1-1.77,4.42-4,6' /%3E%3Cpath d='M16,13c.54,1.33,4,4.5,4,4.5' /%3E%3Cpath d='M10.1,7.46a4,4,0,1,0,1.4,3h-4' /%3E%3C/g%3E%3C/svg%3E") center / 12px no-repeat;-webkit-transition:all .2s ease;transition:all .2s ease;background-size: 20px 20px;display:inline-block;font-weight:400;line-height: 1.8;padding:0 6px;text-align:center;white-space:nowrap;vertical-align: middle;-ms-touch-action: manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select: none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-left:none!important;border-top:none!important;border-bottom:none!important;border-right:none!important;border-radius: 4px} body{top:0px!important} .darkMode .goog-te-gadget-simple{background-color:transparent!important;background:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg style='fill:none;stroke:%23fefefe;stroke-linecap:round;stroke-linejoin:round'%3E%3Cpath d='M.5,2V18A1.5,1.5,0,0,0,2,19.5H17L10.5.5H2A1.5,1.5,0,0,0,.5,2Z' /%3E%3Cpath d='M12,4.5H22A1.5,1.5,0,0,1,23.5,6V22A1.5,1.5,0,0,1,22,23.5H13.5l-1.5-4' /%3E%3Cline x1='17' x2='13.5' y1='19.5' y2='23.5' /%3E%3Cline x1='14.5' x2='21.5' y1='10.5' y2='10.5' /%3E%3Cline x1='17.5' x2='17.5' y1='9.5' y2='10.5' /%3E%3Cpath d='M20,10.5c0,1.1-1.77,4.42-4,6' /%3E%3Cpath d='M16,13c.54,1.33,4,4.5,4,4.5' /%3E%3Cpath d='M10.1,7.46a4,4,0,1,0,1.4,3h-4' /%3E%3C/g%3E%3C/svg%3E") center / 12px no-repeat;-webkit-transition:all .2s ease;transition:all .2s ease;background-size: 20px 20px}Tải xuống mã
    • Sau đó, nhập mã sau vào nơi bạn muốn hiển thị tùy chọn chuyển đổi của Google. Ví dụ sau biểu tượng tìm kiếm
<b:if cond='data:view.isPost'>
<!--[ Google Translator ]-->
<div id='googleTranslateit'/>
</b:if>

    • Sau đó nhập đoạn mã sau trước khi đóng thẻ </body>
<b:if cond='data:view.isPost'>
<!--[ Google Translator ]-->
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
        <script>/*<![CDATA[*/ var lazyts=!1;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&!1===lazyts||0!=document.body.scrollTop&&!1===lazyts)&&(!function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyts=!0)},!0); /*]]>*/</script>
        <script>/*<![CDATA[*/ function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage:'en',includedLanguages:'en,hi,mr,fr,es',layout:google.translate.TranslateElement.InlineLayout.SIMPLE},'googleTranslateit')}$('.hover').mouseleave(function (){$(this).removeClass('hover')}); /*]]>*/</script>
</b:if>

  • Thêm hoặc xóa mã được đánh dấu để bao gồm nhiều ngôn ngữ hơn từ liên kết được đưa ra bên dưới
  • Xong, Lưu Mẫu
Đọc thêm:  Cách tạo Blogspot Blogger hỗ trợ PWA

Mã ngôn ngữ dịch của Google

Kiểm tra mã


Lưu ý: pageLanguage:'vi' trong đó vi là ngôn ngữ blog của bạn, ở đây là tiếng Việt.

Nếu muốn hiện thị tất cả các ngôn ngữ như trong ảnh:

Thêm tiện ích Google Translate tùy chỉnh vào blogspot/blogger

thì thay phần javascript (// Google Translate Language) bằng js bên dưới.

function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'vi', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}

Tham khảo thêm sửa lỗi google dịch tùy chỉnh cho template Plus UI v2.6 tại đây.

bài viết liên quan

Leave a comment

You must login to add a new comment.