Delete all translations and plugin data

Delete all translations and plugin data

How to delete all translations and plugin data
TranslatePress saves your translations into the database – however, deleting the plugin won』t erase them (in order not to accidentally lose all your work).
If you』re looking to remove all the translations and plugin data, you will have to access your database using a management tool like phpMyAdmin and manually delete the created tables, options and meta keys.
Below are the exact steps you need to take to remove all plugin data (translations included) from your database:
1. Deleting the tables
Here is a list of all the tables which are created by TranslatePress:

wp_trp_dictionary* – the dictionary tables contain manually or automatically translated strings
wp_trp_gettext* – the gettext tables contain theme/plugin strings which already have a translation
wp_trp_original_strings – the original strings table contains strings in the default language, without any translation
wp_trp_original_meta – the original meta table contains meta information which refers to the post parent』s id

2. Deleting the options and meta keys
You can achieve this manually or by using the SQL queries mentioned below.
Here is a list of all the options and meta keys created by TranslatePress, along with the tables in which they are inserted:

_postmeta table – meta keys inserted into the _postmeta table have the _trp_ prefix
_termmeta table – meta keys inserted into the _termmeta table have the _trp_ prefix
_options table – options inserted into the _options table have the trp_ prefix
_usermeta table – meta keys inserted into the _usermeta table have the _trp_ prefix

In order to automatically delete all the data mentioned above, the following queries can be used:

delete from wp_options where option_name like 'trp_%';
delete from wp_termmeta where meta_key like '_trp_%';
delete from wp_postmeta where meta_key like '_trp_%';
delete from wp_usermeta where meta_key like '_trp_%';

Note: The default WordPress database prefix is wp_ , replace it with your own database prefix.
By following the 2 steps above you』ll remove all existing translations and plugin data added by TranslatePress to your database.

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.