The Google Translate Widget adds a language translation option to sites with classic themes. While most browsers support built-in translation already, you may still wish to display a language option on your website.
In this guide
The information in this guide applies to classic themes. Sites using modern block themes do not use widgets, so you won’t find Appearance → Widgets in your dashboard.
As an alternative, sites with eligible plans can install a plugin to add a Google Translate language-switching option. There is no official Google Translate plugin, but several popular unofficial plugins can add Google Translate language switching to your site.
With the Google Translate Widget on your website, viewers can click on the “Select Language” dropdown menu to view a list of languages available for translation. Clicking on a language in the list will translate the site’s content into that language.
Once a site is translated, a Google Translate bar will appear at the top of the page to confirm the current language. Here, a visitor can click the arrow next to the language to display the full list of languages to translate the site into a different one, or click on “Show Original” to return to the site’s original language. You can also switch languages right from the widget, too.
To add the widget to your site:
- In your dashboard, click on Appearance → Widgets.
- Choose the location where you’d like to place the widget on your site. Standard options include the Footer and Sidebar, but this may differ depending on your theme.
- Click either of the + block inserter buttons (see right) to see a list of all the available blocks and widgets.
- Scroll down to the Widgets section and click on the widget once to add it to your site.
For more general information, see this guide on working with widgets.
Another feature of the Google Translate widget is an automatic translation link that sends visitors to a version of your site in a specific language.
Once the Google Translate Widget is enabled on your site, you can append a language code to your website’s URL to automatically translate the site to that specific language. For example:
- ?lang=id translates the page into Indonesian
- ?lang=de translates the page into German
- ?lang=es translates the page into Spanish
- ?lang=fr translates the page into French
- ?lang=zh-TW translates the page into Chinese Taiwanese
For most languages, two-letter lowercase abbreviations of languages will work. To find the language code of your choice, use this list of ISO 639-1 codes. Please note, however, that some languages need locales appended to the abbreviation, such as ?lang=zh-TW for Chinese Taiwanese.