Upgrade to version 2.0.5 or newer

Upgrade to version 2.0.5 or newer

Starting with version 2.0.5 we have changed the way individual TranslatePress add-ons are used by simplifying the process and re-packaging all pro add-ons into 3 different premium versions: TranslatePress Personal, Business and Developer.
If you』re upgrading from a version older than 2.0.5 here are the steps you need to take:
Upgrade instructions for TranslatePress older than version 2.0.5
1. Update the main plugin to the latest version
You can upgrade to the latest free version directly from your WordPress site by going into:
WordPress Admin Dashboard → Plugins → Installed Plugins and clicking on the: 「Update now」 button.

Or you can download the latest free version directly from here:
Download the latest free version now
2. Download, install and activate the premium TranslatePress Personal/Business or Developer version
Access your TranslatePress account and download the premium TranslatePress – Personal/Business/Developer version you purchased.
Then install and activate the premium version of the plugin. After you download the plugin, install it from your WordPress admin Plugins → Add New → Upload and upload your .zip file, and then just hit the Install Now button.

3. Deactivate and remove old individual TranslatePress add-ons (these won』t get any new updates)
After the premium version was activated, you can delete all the old TranslatePress related add-ons as they won』t get any new updates moving forward. All of them are now bundled in the premium version of the plugin.

4. Navigate to the Addons tab and activate all the needed functionality
In order to (re)activate the functionality that was added by the old addons, now you can simply navigate to Settings → TranslatePress → Addons tab. From here you have the option to activate/deactivate each addon functionality.

Once you activate a certain add-on, all your old (existing) settings will be ported over.

Replace Default Flags

Replace Default Flags

If you』re looking to replace the default flags for certain languages of your multilingual site you can use one of the two options below:
1. Replace Default Flags — directly from the Advanced tab
​You can add a new flag for an existing language directly from TranslatePress Settings –> Advanced tab –> Custom Language section.
From here you add all the information about an existing language, or just use another image for the flag.

 
Once you』ve uploaded and selected the new flag image make sure to click 「Save Changes」.
You can read more about Custom Languages here.
2. Alternative Code Based Method
Note: if you are looking to replace the default flags in order to add a custom language please consult the documentation here.
You can replace the default flags in TranslatePress by using a bit of coding:

Create an empty plugin like this:
https://gist.github.com/sareiodata/76f701e01db6685829dbSince this plugin will contain the new flags, you』ll have to include the plugin file inside a folder like /tp_custom_flags as well as to create /tp_custom_flags/flags subfolder where the new ones will be found.
Add the following code to the end of it:
/**
* Change flags folder path for certain languages.
*
* Add the language codes you wish to replace in the list below.
* Make sure you place your desired flags in a folder called "flags" next to this file.
* Make sure the file names for the flags are identical with the ones in the original folder located at 'plugins/translatepress/assets/images/flags/'.
* If you wish to change the file names, use filter trp_flag_file_name .
*
*/

add_filter( 'trp_flags_path', 'trpc_flags_path', 10, 2 );
function trpc_flags_path( $original_flags_path, $language_code ){

// only change the folder path for the following languages:
$languages_with_custom_flags = array( 'en_US', 'es_ES' );

if ( in_array( $language_code, $languages_with_custom_flags ) ) {
return plugin_dir_url( __FILE__ ) . '/flags/' ;
}else{
return $original_flags_path;
}
}

Modify the code by editing the language codes list with the languages you wish to replace. In the example we are adding custom flags for languages en_US and es_ES. The rest of the flags will not change.
Make sure you place your desired flags in a folder called 「flags」 next to this file. Put both the folder and this file into another folder.
Make sure the file names for the new flags are identical with the ones in the original folder located at 『plugins/translatepress/assets/images/flags/』.
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

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

Disable SQL errors notices

Disable SQL errors notices

TranslatePress has a system that tracks SQL errors and helps you display them.
This system can be disabled in some cases, for example:

false positives
errors that announce various problems, these being false.

With the help of this code, TranslatePress no longer:

records SQL errors
prevents admin notices from appearing
and disables automatic translation

If you want to insert this custom code, follow these steps:
1. Create an empty plugin like this:
https://gist.github.com/sareiodata/76f701e01db6685829db
2. Add the following code to the end of it:
add_filter('trp_disable_error_manager','__return_true');
 
3. 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.

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

Disable translation of Gettext strings

Disable translation of Gettext strings

Strings outputted by WordPress themes or plugins are called Gettext strings. Translating these types of strings through TranslatePress can be unnecessary if they are already translated or you plan to translate them using the .po/.mo translation file system.

Disabling this feature of TranslatePress can improve the page load perfomance of you site in certain cases.

Download and activate the following plugin to disable translation of Gettext strings. No other setting is necessary.

Download Disable Gettext Strings Translation Add-on

Add a custom language

Add a custom language

If you need to translate your WordPress site in a language that is not found in the All Languages drop-down you can easily add a custom language.
This feature lets you add one or more custom languages directly from TranslatePress Advanced Settings. Once the language(s) is added it will appear and can be selected from the languages list.
Steps to Add a Custom Language to your Multilingual WordPress Site
To add a custom language, navigate to TranslatePress -> Settings and select the Advanced tab. Then click the 「Custom language」 section.

Here you』ll be asked to input the following custom language details:

Language Code: the language code of the language, which will be used in the url
Language name: the name of the language, as it will appear in the languages list.
Native name: the native language name, which will be used only if you select the option to display languages in their native names
Automatic translation code: the code used by Google Translate or DeepL to do the automatic translations
Flag URL: in order to add a flag to your language, simply upload a PNG file into the WordPress media library and then copy its URL here (TranslatePress will take care of the resizing)
Text RTL: check only if the custom language is written in right to left format

Once you』ve added all the custom language details don』t forget to click the Add button and then Save Changes. Your custom language will now appear in the language list and you can select it.

After this, your custom language will appear in the front-end translation interface.

It will also be listed in the language switcher:

The premium version of TranslatePress has no limitation on the number of custom languages that you can add. In the free version the number of translation languages is limited to two.
Following these steps you can start translating your site in any language you want. Even Klingon!

 
Editing an existing language
If you wish to edit the name or the flag of an existing language you can achieve this by going to TranslatePress -> Advanced Tad -> Custom Languages.
You can add the Language Code of the language you wish to edit. The language code can be found in General Settings under Code.

Fill in the Language Code and the changes you want to make. The Language Code field is required but apart from that any field left unfilled will be automatically completed with the rest of the information.

By doing this you can edit the name or the flag of an existing language. After clicking Add and saving the changes, the language will appear in General settings under Custom Languages.

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