Create a Google Translate Widget for Your Website: A Simple Guide

Make Your Website Multilingual in 5 Minutes
Conveythis demo
Conveythis demo
7809433

Ready to translate your website?

Steps to create Google Translate Widget

To create a Google Translate widget, you need to include the Google Translate API script in your website and create a container for the widget. Here are the steps:

  1. Get a Google Translate API Key: To use the Google Translate API, you need to have a Google Cloud account and generate an API key.

  2. Include the API script in your HTML: Add the following code to your HTML file to include the Google Translate API.

  3. Create a container for the widget: Create a div element with a unique id that will serve as a container for the widget. You can place this element anywhere on your website where you want the widget to appear.

  4. Initialize the widget: Add the following JavaScript code to your HTML file to initialize the widget and set the default language.
    You can replace 'en' with the desired default language code.
  5. Test the widget: Load your website in a browser and verify that the widget is functioning correctly. 

Note: This code assumes you have access to the Google Translate API, which is not available for free. If you are building a website for commercial purposes, you may need to pay for usage of the API.

Screenshot 2

Best Google Translate Plugin for WordPress

There are several WordPress plugins that offer integration with Google Translate, which can be useful for website owners who want to make their content available in multiple languages. Some popular options include:
 
  1. ConveyThis: This plugin allows you to translate your website into multiple languages using the Google Translate API or other translation services. It offers a visual translation editor and support for more than 100 languages.

  2. WP Google Translate: This plugin adds a widget to your website that allows visitors to translate the content into their preferred language using Google Translate. It supports more than 100 languages and offers a variety of customization options.

  3. Polylang: This plugin allows you to create a multilingual website with WordPress, with support for more than 40 languages. It offers integration with the Google Translate API, as well as other translation services, and allows you to translate posts, pages, and custom post types.

  4. TranslatePress: This plugin allows you to translate your website using a simple visual translation editor, with support for more than 100 languages. It also offers integration with the Google Translate API, which can help improve the accuracy of translations.

Ultimately, the best Google Translate plugin for your WordPress website will depend on your specific needs and preferences. It may be helpful to try out a few different options to see which one works best for you.

Website Translations, Suited for you!

ConveyThis is the best tool to build multilingual websites

arrow
01
process1
Translate Your X Site

ConveyThis offers translations in over 100 languages, from Afrikaans to Zulu

arrow
02
process2-1
With SEO in Mind

Our translations are search engine optimized for overseas traction

03
process3-1
Free to try

Our free trial plan lets you see just how well ConveyThis works for your site

SEO-optimized translations

In order to make your site more appealing and acceptable to search engines like Google, Yandex and Bing, ConveyThis translates meta tags such as Titles, Keywords and Descriptions. It also adds the hreflang tag, so search engines know that your site has translated pages.
For better SEO results, we also introduce our subdomain url structure, where a translated version of your site (in Spanish for example) can look like this: https://es.yoursite.com

For an extensive list of all available translations, go to our Supported Languages page!

translate website to Chinese
secure translations

Fast and Reliable translation servers

We build high scalable server infrastructure and cache systems that provide instant translations to your final client. Since all translations are stored and served from our servers, there are no extra burdens to your site’s server.

All translations are securely stored and will never be passed on to third parties.

No coding required

ConveyThis has taken simplicity to the next level. No more hard coding required. No more exchanges with LSPs (language translation providers) needed. Everything is managed in one secure place. Ready to be deployed in as little as 10 minutes. Click the button below for instructions on how to integrate ConveyThis with your website.

image2 home4