Generate Google API Key

Generate Google API Key

Setting up API keys for Google Translate
This step-by-step tutorial will guide you through generating a Google Translate API Key.

Create a new Project
Go to API Services
Create new API key
Restrict API to particular website
Restrict usage to control costs – Important!
Copy API key
Paste into TranslatePress Settings

Watch this short video for a quick tutorial:
<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>
In order to create a Google Translate API Key, you need a paid account. Through their terms and services, Google doesn』t allow for non-paid usage of their Translation API.
More information is available at: https://cloud.google.com/translate/
To create your application』s API key simply follow the steps below:
Go to the Cloud Platform Console.
1. Create a new Project from the top bar.

2. With the new project selected, go to the hamburger menu to the left and visit API & Services

From Dashboard enable Google Translate API

Search for translate API and enable it

3. From the credentials interface create a new API Key.

4. Restrict your API Key to a particular website

In Google Dashboard, use the HTTP Referrer provided in the description of the Google Translate API Key field in Settings -> TranslatePress -> Automatic Translation tab, as shown in the following screenshot.

5. Restrict Usage of API
In order to have control over the cost of Google Translate API, it is highly recommended to set quotas to limit the usage.
Go to Google API』s & Services → Dashboard → Cloud Translation API → Quotas and set up quotas as shown in the following screenshot.

6. Copy your API Key for use in TranslatePress

7. Enable Automatic Translation and add Google Translate API Key in TranslatePress
TranslatePress lets you automatically translate your WordPress site by using Google Translate.
TranslatePress MultilingualTranslatePress is the easiest way to translate your WordPress site. It's fast, won't slow down your website, works with ANY theme or plugin and it's SEO friendly.Get the plugin Or download FREE version
For this navigate to TranslatePress -> Settings , and make sure to Enable Automatic Translation, by setting it to Yes. Then, under Translation Engine, select Google Translate v2.
This will uncover the Google Translate API key field. Place the API key in this field and Save Changes.

That』s it! You can now simply navigate to the front-end of your website and browse it in the language of your choice. You』ll notice the content has been automatically translated.

Automatic Translation

Automatic Translation

The Automatic Translation page from TranslatePress lets you enable and configure the automatic translation of your website content through the available APIs.
The free version of TranslatePress lets you use the Google Translate v2 API, while the paid versions also offer an integration with the DeepL API.
In order to use these APIs you will need to create an account with the vendor and get a key. Access to these APIs is not granted with a TranslatePress licence. For more info, refer to the pages below:
– How to generate a Google API key
– How to generate DeepL API key
To minimize translation costs, each untranslated string is automatically translated only once, then stored in the database.
Automatic Translation Settings

There are a few settings that you can configure when setting up the Automatic Translation feature.
Block Crawlers – if you enable this option, crawlers that are indexing your website will not trigger the automatic translation of your website
Limit machine translation / characters per day – this option lets you limit the amount of characters that the plugin translates through the selected translation API each day.
The default limit is set at 1 000 000 characters but you can adjust this to your liking. The main purpose of this option is to limit the overall costs that you experience from the translation API.
Log machine translation queries – this option is only recommended for testing and debugging as it might affect performance.
By enabling it, every request that is made to the selected translation API will be logged in your database so you can inspect it.

Translator Accounts

Translator Accounts

The Translator Accounts add-on is only available with a Developer or Business license.
Using the Translator Accounts Add-on you can create or allow existing users to translate the site without admin rights.
The translators will be able to translate the website (directly from the front-end) without having to work with the WordPress back-end, site builders or meta boxes.
Install the Translator Accounts Add-on
Install and activate a premium version of TranslatePress (Business or Developer). Once installed, go to Settings → TranslatePress in your WordPress dashboard, and then navigate to the Addons tab.

Scroll down to the Translator Accounts Add-on and Activate it here.

Translator Accounts Features
Create a new user with the Translator role: WordPress → Users → Add New.

Allow existing users to translate the website: WordPress → Users → Edit User → TranslatePress Settings (or by changing their current role to the Translator role).

Get Translator Accounts Add-on

SEO Pack

SEO Pack

The SEO Pack Add-on allows you to translate important SEO elements from every page:

URL slugs

post/page/custom post type/post type base slugs
taxonomy/terms slugs

page title
page description
image alt tag
Facebook and Twitter title and descriptions (these are usually added by your SEO plugin and appear when users share your content)

To translate the above, simply select them from the string list under Meta Information, enter their translation and click 「Save translation」.

The URL slugs can be translated in depth from the String Translation tab.
TranslatePress SEO Pack addon works out of the box with all SEO plugins.
Install the SEO Pack Add-on
Install and activate any premium version of TranslatePress (Personal, Business, or Developer). Once installed, go to Settings → TranslatePress in your WordPress dashboard, and then navigate to the Addons tab. Activate the SEO Pack Add-on here.

Multilingual Sitemaps
Using the SEO Pack addon, TranslatePress will extend the Sitemaps functionality added by SEO plugins and automatically create a multilingual sitemap that includes all your translated content.
Your website sitemap will then correctly represent each individual translation.
Multilingual Sitemaps support is available for the most popular SEO plugins:

Yoast SEO
Rank Math
SEOPress
All in One SEO Pack
Squirrly SEO

The translation alternate links are implemented as specified in the Google Webmasters documentation.
Having all the important SEO elements translated, as well as creating a multilingual XML Sitemap will have a major impact on your site ranking into multiple languages.
Translating Slugs
The SEO Pack add-on allows translation of all the URL slugs:

Taxonomy slugs
Term slugs
Post slugs (this includes pages and custom post types)
Post type base slugs
WooCommerce slugs

To translate slugs you need to access the TranslatePress Translation Editor and switch to the String Translation tab (lower left).
Select the type of slugs you want to list from the mini tabs. Filter your search by translation status and keyword. Choose a language to have an easy overview over the translations.

The SEO Pack add-on is only available in the premium versions of the plugin.
Get SEO Pack Add-on

Navigation Based on Language

Navigation Based on Language

The Navigation Based on Language add-on is only available with a Developer or Business license.
With the Navigation Based on Language Add-on you can have menu items displayed or hidden based on the current language.
It helps you create multilingual menus that contain different menu items for different languages.
It』s useful when you want to display different pages for different languages. Or for when certain content is not translated in a specific language and you don』t want it to appear in the menu for that language.
Install the Navigation Based on Language Add-on
Install and activate a premium version of TranslatePress (Business or Developer). Once installed, go to Settings → TranslatePress in your WordPress dashboard, and then navigate to the Addons tab.

Scroll down to the Navigation Based on Language Add-on and Activate it here.

Configure your menu items
With the add-on active, you can go to WordPress → Appearance → Menus and select what menu items appear for each language.

This will let you create multilingual menus that have different menu items in different languages.
Get Navigation Based on Language Add-on

Extra Languages

Extra Languages

The Extra Languages add-on is only available in the premium versions of the plugin.
Extra Languages Add-on allows you to add as many languages as you need to your WordPress site. You can select from a list of 221 secondary languages.
This add-on also gives you editorial control over each language, allowing you to publish a new language only once everything is translated.

Install the Extra Languages Add-on
Install and activate any premium version of TranslatePress (Personal, Business, or Developer). Once installed, go to Settings → TranslatePress in your WordPress dashboard, and then navigate to the Addons tab. Activate the Multiple Languages Add-on here.

Configure your menu items
With the add-on active, you can go to Settings → TranslatePress and add as many languages as you want.

After adding the desired languages, you will need to save the page by scrolling to the bottom of the page and clicking on 「Save Changes」.
You can choose what languages to be displayed for visitors or only to the administrator and the translator of the website by checking/ unchecking the box in front of the language.

The Multiple Languages add-on is only available in the premium versions of the plugin.
Get Extra Languages Add-on

Language by GET parameter

Language by GET parameter

WARNING: This is an experimental addon designed for websites which do not have pretty permalinks enabled. It might cause unexpected side-effects and it』s usage is not recommended.
If your website doesn』t have pretty permalinks available you can still use TranslatePress by installing an add-on.
Using the Language by GET parameter Add-on you can encode language in the url as a GET parameter. Your website will use URLs such as this one:
http://www.example.com/?lang=en
This will replace the language directory system which uses the following URL format:
http://www.example.com/en/
There is no need for extra configuration. You just have to activate it and that』s it.
Download Language by GET parameter Add-on
 
The default GET parameter used is lang. This can be changed using a bit of coding:

Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db
Add the following code to the end of it:
add_filter( 'trp_gp_lang_parameter', 'trp_gp_change_parameter_name' );
function trp_gp_change_parameter_name( $name ){
      return 'language';
}

Replace language with the GET parameter of your choice.
Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality

Get Language by GET parameter Add-on

DeepL Automatic Translation

DeepL Automatic Translation

The DeepL Automatic Translation Add-on is only available with a Developer or Business license.
The DeepL Automatic Translation add-on for TranslatePress lets you automatically translate your website through the DeepL API.
DeepL is a very powerful machine translation tool backed by artificial intelligence and neural networks.
To check the list of supported languages, please go to this page and look at the Example Response.
Install the DeepL Automatic Translation Add-on
Install and activate a premium version of TranslatePress (Business or Developer). Once installed, go to Settings → TranslatePress in your WordPress dashboard, and then navigate to the Addons tab.

Scroll down to the DeepL Automatic Translation Add-on and Activate it here.

How to generate DeepL API key
In order to use the API, you will need to get an API key.
DeepL offers free API access that allows you to translate up to 500,000 characters per month for free.
If you need more than that, you can purchase a DeepL Pro API subscription: https://www.deepl.com/pro.html#developer
The package that contains API access is listed under For Developers → DeepL API and it costs 4.99€ + usage fees.
After you』ve created the account for DeepL go to your Account page where you will find your API key:

Copy the API key, then go to Settings → TranslatePress → Automatic Translation, select DeepL, choose your API version (free or paid), and enter your key.
Set Up Cost Control

From your DeepL Account Page, you can also control the overall costs that you might experience by using the API.
To do this, go to your DeepL Account Page and then click on Change cost control settings.

To activate cost control, check the box and then you can configure the Maximum total monthly price and the Maximum total monthly usage.
Get DeepL Automatic Translation Add-on

Browse As Role

Browse As Role

The Browse as User Role add-on is only available with a Developer or Business license.

You can browse your website from the translation editor as yourself (logged in) or as a non-logged in user.
This allows you to translate pages or strings that are dynamic based on the logged-in/ non-logged-in status.
The Browse as User Role add-on allows you to select any user role, then view the site like a user with that role would see it.
This makes it really easy to translate role-specific content.
Install the Browse as User Role Add-on
Install and activate a premium version of TranslatePress (Business or Developer). Once installed, go to Settings → TranslatePress in your WordPress dashboard, and then navigate to the Addons tab.

Scroll down to the Browse as User Role Add-on and Activate it here.

Get Browse As Role Add-on