How to use TranslatePress in WordPress with Google Translate

How to use TranslatePress in WordPress with Google Translate

TranslatePress is a powerful translation plugin for WordPress and WooCommerce, that can facilitate language translation on your self-hosted WordPress website for 221 languages.

You can manually translate content, or use Google Translate integration to speed things up.

Why might you use TranslatePress?

It really depends on your business goals, but a big one is opening up new markets, or better serving existing ones if you have noticed a lot of your customers coming from a particular country that speaks a different language.

Let’s say you sell a product that is in high demand in Japan. It might make sense to offer your website in Japanese so that it is easier for Japanese customers to find you and your products. If you don’t have the budget to hire a Japanese translator, you could use the Google Translate integration to do the initial translation of your website. As your budget grows, you might hire a translator to review the translations and ensure they make sense for your Japanese customers.

TranslatePress includes the tools to make this kind of growth possible. So, let’s have a quick look at how to use TranslatePress in WordPress with Google Translate.

1. Get TranslatePress

If you don’t already have TranslatePress installed, you can get the free plugin from the WordPress repository here. This is a great place to start and lets you use the Google Translate API to get yourself translating automatically. Please note though that if you want to translate your site into multiple languages, you will need to purchase at least a “Personal” subscription (pricing here) to get access to the Multiple Languages Add-On. Depending on your needs, it might also be worth jumping up to the “Business” subscription to get some other really handy add-ons like automatic user language detection and translator accounts. You can always do this at a later date though.

For right now, go through the usual process of installing and activating the TranslatePress plugin on your WordPress website. If you need help with this, get in touch.

2. Configure TranslatePress

Once you have TranslatePress installed, you can find it in your WordPress dashboard in two handy locations. 

You can either go to the “Settings” menu on the left side and click “TranslatePress”, or you can hover over the “Translate Site” text that appears in the top admin bar and click “Settings”.

TranslatePress in the Settings menu
TranslatePress in the Settings menu
TranslatePress Admin Bar Menu
TranslatePress Admin Bar Menu

Once you have TranslatePress installed, you can find it in your WordPress dashboard in two handy locations. 

You can either go to the “Settings” menu on the left side and click “TranslatePress”, or you can hover over the “Translate Site” text that appears in the top admin bar and click “Settings”. Either one will take you to your TranslatePress settings page which should look something like this:

TranslatePress Settings Screen
TranslatePress Settings Screen

Almost all of your settings are located in the “General” tab, which is displayed by default. So what is everything?

Default Language

The default language is set to your WordPress language when you first install TranslatePress. This is the language that your website is written with. 

TranslatePress Default Language Selection
TranslatePress Default Language Selection

All Languages

This is where you configure your website languages. You can add new languages, decide what “slug” to use (this forms part of the address when users are accessing the site in another language), whether they are active or not, and the order that they will appear in, both in translation drop-downs for admin users and on the front-end language switchers. 

By default, the language in first position will be your default language, in the below screenshot, it’s English (Australia). 

TranslatePress All Language Settings
TranslatePress All Language Settings

In the screenshot above, I’ve added a second language by selecting “Spanish (Spain)” from the “Choose…” drop down and then clicking the “Add” button.

TranslatePress has conveniently pre-filled the slug with the ISO country code. If you are just using the free version of TranslatePress, you can configure one additional language. If you have the Multiple Languages Add-On installed, you can go ahead and add as many languages as you like.

Rearrange languages

If you want to change the order that languages appear in, click and drag the little waffle icon beside the language you want to move. For example:

Native language name

Ok, we have our languages defined, so we move on to more of the functional configuration. The native language name setting controls how language names appear on the front-end for your users. Do you want them all to be written in English? Or should they be written in their own language?

For example, if I have native langauge name set to No, then English and Spanish will be written in English. If I set it to yes though, then they will be written English and Español. Taking this further, a language that uses different symbols, like Japanese, would be displayed as 日本語. This allows foreign language readers to recognise their language more easily.

Use a subdirectory for the default language

The use a subdirectory for the default language option will format your default language URL in the same way as your additional languages.

As an example, with this option disabled, your URL might be: https://stillaslife.com

If someone accesses it via the Japanese language, it might be https://stillaslife.com/jp

By turning on the default language subdirectory, the above example would be https://stillaslife.com/en_au for the default English (Australia) site language.

The secondary effect of this is that your default language will always be at the top of the list of languages on your site.

TranslatePress Subdirectory Settings
TranslatePress Subdirectory Settings

Force language in custom links

This one is really important, in my opinion. What this option does, is ensure that all your custom links are updated to point to the same language page that the user is currently viewing. If this is disabled, and someone was viewing your site in Japanese. They might click a blog link and be taken to an English page. They then have to switch languages again. Enabling this ensures that they continue to see Japanese language content regardless of what links they click on your site.

TranslatePress Force Language
TranslatePress Force Language

Googe Translate

Let’s be honest, this is probably the reason that we are all here. We want Google to translate our content for us!

If you enable this option, and set your API key in the next option, then TranslatePress will automatically query Google’s Cloud Translation API for translations of any untranslated strings on your website. It then stores these in your database ready for you to review and edit later (if you want to). So, let’s get setup!

Googe Translate API Key

If you don’t already have an API key, click the link below this field to set one up.  Make sure to enable the “Cloud Translation API” on your API key. If you need help with this, please contact us.

Now, I should note, Google Cloud Translate is a PAID service. However, Google does include free credits for new accounts, which should be more than enough to translate most small to medium sites into another language.

Once you enter your new API key, click the “Test API Key” link to make sure it is working as expected.

TranslatePress Google Translate API Key
TranslatePress Google Translate API Key

The time it takes to translate your site will vary depending on any budget constraints you set on your API, as well as daily character limits, and the size of your site. Google also places limits on budgets initially.

To give you some guide, we translated https://stillaslife.com with 1,500 entities, in approximately 6 months with a 100,000 daily character limit. This also stayed under the free credits quantity provided by Google. Now, each new post gets translated within a day, unless it is especially long.

Language Switcher

The last settings you need to configure are the options to enable language switching on the front-end of your website. Which method works best for your design and users?

I personally like the floating language selection because it just floats along the bottom of the web browser window, easily accessible no matter where the user is on your page.

Other options include a shortcode, or a menu item.

TranslatePress Language Switcher Options
TranslatePress Language Switcher Options

For each of the different language switcher placements, you can choose how to display the different languages.

Your choices are:

  • Full language names
  • Short language names
  • Flags with full language names
  • Flags with short language names
  • Only flags

The right option for you will probably depend on your design, and your audience. Will they recognise their flag and what it means? If so, that might be all you need!

TranslatePress Language Switcher Choices
TranslatePress Language Switcher Choices

3. Sit back and relax

Your site is now automatically translating with TranslatePress and the Google Cloud Translate API.

There is currently no way to know how far TranslatePress has gone through translating content, you can always switch languages on any page though to see how it is going.

If you want to do some or all of the translation yourself, there are options built in for that on every page, but that’s for another blog post!

What do you think?

TranslatePress is one of the newer translation options for WordPress. It’s extremely easy to use, but it almost feels too simple, like there isn’t enough control! Perhaps there isn’t, depending on what you need. With some of the add-ons, you can give yourself more control over SEO, translator users and more. Personally, I love how simple it is, and the fact that the translations are stored in my database means it is faster than a live translation option. It also means I can go in and tweak translations as appropriate, without having to do the whole lot from scratch. What do you think? I’d love to hear your thoughts in the comments below!

Leave a comment

Almost there!

Enter your first name and email to download our free privacy policy template.

Sending out marketing emails?Download our Complete Email Marketing Checklist!