Translate links

Translate links

Internal links are translated automatically by TranslatePress. All the page or post links within your site are translated to their version of the currently displayed language.
Custom internal links that are added directly to the HTML (without using PHP functions to construct them) are those added in the post content for example. These links can also be automatically translated by TP if the option Force language in custom links is set to Yes. This option is active by default and can be changed in Settings -> TranslatePress -> General tab.
What』s left are links to internal media such as images, documents or archive files, and external links. These can be translated manually from the Translation Editor interface.
Simply hover a link, click the button and translate the link. For each language you can either place the translated link or select a resource using Add Media button. This allows you to use the WordPress Media library to select an existing image, PDF or other files, or upload a new file.

In this screenshot we have translated the external link of the Wikipedia article in English, to the French version of the Wikipedia article.
Basically we have translated the href of that anchor to point to another url.

Keyboard Shortcuts in Translation Editor

Keyboard Shortcuts in Translation Editor

To speed up the translation process, you can use the following keyboard shortcuts in TranslatePress Editor.

CTRL ( ⌘ ) + S – Save translation for the currently editing stringsCTRL ( ⌘ ) + ALT + Z – Discard all changes for the currently editing strings CTRL ( ⌘ ) + ALT + → (Right Arrow) – Navigate to next string to translate CTRL ( ⌘ ) + ALT + ← (Left Arrow) – Navigate to previous string to translate

Translators can save time by using the keyboard to perform key actions instead of using the mouse cursor to click the corresponding action buttons.

CTRL ( ⌘ ) + S

Saving translations using this shortcut allows you to maintain your focus on the task instead of looking for the Save translation button.

CTRL ( ⌘ ) + ALT + Z

Discarding unwanted changes can be done much easier with this shortcut. This will Discard changes for the selected string and available meta information (such as title, alt or image source) in the sidebar, in all the languages.

CTRL ( ⌘ ) + ALT + ← (Left Arrow) CTRL ( ⌘ ) + ALT + → (Right Arrow)

Navigate to next or previous string of the page using these two commands.

Translation Editor

Translation Editor

The Translation Editor can be accessed from both the Settings page or from the Admin bar.
Normally, you can access it from the WordPress Admin Bar -> Translate Site button.

If the Admin Bar is not available (for example, wordpress.com hosting replaces the default admin bar with it』s own), you can access it from WordPress -> Settings -> TranslatePress -> Translate Site.

It』s a simple interface that allows you to translate your website page by page.

Edit visible text
The main functionality of the translation editor is the possibility to translate string by string your entire page.
Simply hover over a string, click the edit button that appears on the left and translate your string in the left translation interface.
Changing language
Selecting a new language will allow you to navigate your site in that particular language, making it a lot easier to notice untranslated strings.
Search for a string
Not all detected string are visible in the page. Strings like SEO Title, meta description and sometimes other strings that don』t have a the edit button can be found by simply searching the list of strings.
Browse As

You can Browse your website from the translation editor as your self (logged in) or as a non-logged in user. This makes it easy to translate pages that are dynamic based on the logged in / non-logged-in status.
You can navigate as a different user role with the Browse as Role Addon.
 
Translate SEO elements
The SEO Addon is only available in the paid versions of the plugin.

Using this addon you can translate all the SEO elements from every page:

URL post/page/custom post type slug
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, choose them from the string list under Meta Information.
TranslatePress works out of the box with all SEO plugins.
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.
Multilingual Sitemap support is added for the most popular SEO plugins:

Yoast
Rank Math
SEOPress

Having these important SEO elements translated, as well as creating a multilingual XML Sitemap will have a major impact on your site ranking into multiple languages.
Here』s a short video covering how to translate the most important SEO elements using TranslatePress and its SEO Pack addon:

Translation Blocks
To translate larger blocks of html with a single translation you need to join multiple translation strings into a translation block.
Merging a string with its parent paragraph is done by hovering a string that you want to join with its surrounding strings within the parent. Click the merge button  shown for the hovered string.The block that will be merged is now highlighted in the live preview. The full text containing the HTML structure, is now shown in the left sidebar where you can optionally add a translation. Click the Save Translation button to confirm the creation of the translation block.
Merging a translation block
Now the translation block will be translated as a whole. You can edit the translation by clicking the Edit button .  When writing a translation for the translation block, be careful to insert a valid HTML in the translation block.
Note: The merging icon will be available only to the strings compatible with translation blocks. Merging is allowed within block elements such as paragraphs and divs. Content received through wp-ajax requests is also compatible.The translation block is not compatible with Gettext strings or strings dynamically inserted with JavaScript.
To go back to translating individual strings from a created translation block you need to hover it and click the Split button . A pop-up will appear asking you to confirm separating the translation block into smaller pieces. The translation of the whole translation block will be available anytime you decide to merge back again.
How to Translate words in different contexts
You can also specifically select any HTML block to be translated as a whole by adding the class 『translation block』 to it. For example:

Partner
Partner
Translate everything

inside

Image translation
Find out how to show different images for different languages in our image translation documentation.
Link translation 
Find out which links can be manually translated and which are automatically translated in our link translation documentation.
Keyboard Shortcuts
Take advantage of the Translation Editor』s keyboard shortcuts to speed up the translation process.

TranslatePress Documentation

TranslatePress Documentation

Welcome to TranslatePress knowledge base

Installation
Settings

Default Language
Translation Languages
Display language in it』s native name
Use subdirectory for default language
Force language in custom links
Language Switchers

Shortcode
Menu item
Floating language selection

Advanced Settings

Automatic Translation

Generate Google API key
Generate DeepL API key

Translation Editor

Edit visible text
Changing language
Search for a string
Translate SEO elements
Translation Blocks (translate multiple strings at once)
Image Translation
Link Translation
Keyboard shortcuts

Restrict by Language

Conditional Shortcode based on Language
Elementor Integration
Oxygen Builder Integration
WPBakery Integration

Addons

SEO Pack
Extra Languages
Translator Accounts
Browse as Role
Navigation Based on Language
Automatic User Language Detection
DeepL Automatic Translation

How To Translate

Astra Theme
Avada Theme
Beaver Builder sites
Brizy Page Builder
Charitable Plugin
Divi Sites (Theme & Page Builder)
Elementor Popups
The Core Theme by ThemeFuse
Visual Composer sites
WPZoom Theme
WooCommerce Product Table
Neve Theme
Oxygen Builder

Troubleshooting
Frequently Asked Questions
For Developers

Replace Default Flags
Add a custom language
Show opposite language in language switcher
Fix broken HTML
Change language name
Translate only certain pages
Change hreflang localization
Exclude a certain element or text from being translated
Disable Gettext Strings Translation
Clickable Language Switcher
Sites without pretty permalinks
Disable SQL errors notices
Delete all translations and plugin data

Advanced Settings

Advanced Settings

To access the Advanced Settings, navigate to WP Dashboard Settings -> TranslatePress, and choose the tab Advanced.

The option settings found here are mostly useful for fixing issues that may occur while integrating TranslatePress into your site.

Fix missing dynamic content
Disable dynamic translation
Fix spaces between HTML attributes
Fix broken HTML
Filter Gettext wrapping from post content and title
Filter Gettext wrapping from post meta
Automatically translate slugs
Exclude Gettext Strings
Exclude from dynamic translation
Exclude selectors from translation
Do not translate certain paths
Translate numbers and numerals
Date format
Custom languages

1. Fix missing dynamic content
May help fix missing content inserted using JavaScript, if the issue manifests only on translated pages.
It shows dynamically inserted content in original language for a moment before the translation request is finished.
2. Disable dynamic translation
It disables detection of strings displayed dynamically using JavaScript.
Strings loaded via a server side AJAX call will still be translated as well as the HTML page served from the server.
3. Fix spaces between HTML attributes
If the HTML of your theme and plugins contains bad formatting, this option might help. Specifically, it fixes cases where HTML attributes don』t have spaces between them.
Below is an example of case where this option helps. Observe missing space between id attribute and class attribute.

Activating this option may help fix missing or broken content from the HTML on translated pages. In general, the issues don』t manifest in the original language.
If the issue manifests on original language too, this option probably won』t help.
4. Fix broken HTML
General attempt to fix broken or missing HTML on translated pages.
Only try this if the 「Fix spaces between html attribute」 option did not solve the issue.
If your issue is still not solved, look for bad formatting in the missing HTML and correct it in the plugins/theme.
Common bad formatting includes duplicate attribute on same tag, like the class attribute in the following example:

5. Filter Gettext wrapping from post content and title
Filters gettext wrapping such as #!trpst#trp-gettext from all updated post content and post title. Does not affect previous post content.
Database backup is recommended before switching on.
6. Filter Gettext wrapping from post meta
Filters gettext wrapping such as #!trpst#trp-gettext from all updated post meta. Does not affect previous post meta.
Database backup is recommended before switching on.
7. Automatically translate slugs
Generate automatic translations of slugs for posts, pages and Custom Post Types.
Requires SEO Pack Add-on to be installed and activated.
8. Exclude Gettext Strings

Exclude these strings from being translated as Gettext strings. Leave the domain empty to take into account any gettext string.
Can still be translated as regular strings.
Can be useful for when a Gettext string is outputted wrapped in #trpst#trp-gettext.
Also can be used when a Gettext string is used as a key in options.
After entering the string and domain click Add button to include them in the list. Click Remove to remove them from list.
9. Exclude from dynamic translation

Do not dynamically translate strings that are found in html nodes matching these selectors.
Excludes all the children of HTML nodes matching these selectors from being translated using JavaScript.
These strings will still be translated on the server side if possible.
Any type of JS selectors can be used. It』s recommended to use a selector closer to the string being inserted that needs to be excluded.
After entering the selector click Add button to include them in the list. Click Remove to remove them from list.
10. Exclude selectors from translation

Do not translate strings that are found in html nodes matching these selectors.
Excludes all the children of HTML nodes matching these selectors from being translated.
Do not use not() selector or double attribute selector [attribute1][attribute2].
After entering the selector click Add button to include them in the list. Click Remove to remove them from list.
11. Do not translate certain paths

Choose what paths can be translated. This feature has two operation modes. You can either Exclude Paths From Translation or Translate Only Certain Paths.
After choosing the operation mode, enter the paths that you want to apply this setting to. For example, to exclude https://example.com/some/path you can either use the rule /some/path/ or /some/*.
Each rule should be on it』s own line. To exclude the homepage use the {{home}} tag.
When this option is activated, the plugin will not display the language switcher on the excluded or not included pages and their translations will not be accessible.
12. Translate numbers and numerals
If checked, will enable the translation of numbers (e.g. phone numbers) found in the text. This may be useful if you want to have different contact phone numbers for each translated language of your site.
13. Date format
Provides a way to customize the display format of date and time for each translated language. Uses the same format as WordPress date and time formatting. Please note this feature does not save the translated date and time text, it just enables finer customization.
14. Custom languages

 
This feature is useful when translating your site into a language not listed under General Settings.  It allows you to input one or more so called custom languages and have them visible on the front end and in the translation options. There is no limitation on the number of custom languages that you can input. However if you are using the free version of TranslatePress the number of translation languages is limited to two.

Settings

Settings

You can access the TranslatePress plugin settings in the administrator area in the menu under Settings -> TranslatePress.
It can also be accessed both from the frontend and administrator area from the Admin Bar under the newly created button under the Settings drop-down.

Default Language
Select the original language from the drop-down your website was written in.
By default the language is inherited from the WordPress language that you can setup on install or change from Settings -> General.
Translation Languages
Interface which allows you to select the languages you wish to make your website available in. You just have to select the language from the drop-down and click the Add button.
Actions you can perform on the languages:

edit the slug of the language that will appear in the urls of the site from the Slug input
make the language active for the visitors of the site or only available for translation for the administrator and the translator by checking or un-checking the Activate checkbox ( Feature available only with Extra Language add-on )
remove the language by clicking the Remove link ( this will not delete the existing translations from your data base )
rearrange the order of the languages with the drag drop interface. This will determine the order in the language switcher floater and shortcode.
placing a translated language on the first position will make it the first language to show to website visitors if option Use subdirectory for default language is active

Display languages in their native names
Select Yes if you want languages to display in their native names. Otherwise, they will be displayed in English.
Use subdirectory for default language
Select Yes if you want to add the language slug in the url for the default language. Example www.myhomepage.com/en/ instead of www.myhomepage.com when visitors are viewing the site on its default language.
By selecting Yes, the default language seen by website visitors will become the first one in the 「All Languages」 list. This means that you can make one of the translated languages be the language to display when visitors access your website without language encoding in the url ( such as www.myhomepage.com, without /en/ for example ).
Instead of directing the user to a pre-defined language, you can also redirect them to their preferred language using the Automatic Detection of User Language add-on.
Force language in custom links
Select Yes if you want to force custom links without language encoding to add the language slug in the url for the default language.
Google Translate
Enable or disable the automatic translation of the site with Google Translate. Existing translations will be not be affected.
Note: Not all languages support automatic translation. Please consult the supported languages list.
Language Switcher
You have three options to display language switchers on the site:

Shortcode ( Use the [language-switcher] shortcode on any page or widget. )
Menu item ( Go to Appearance -> Menus to add Language Switcher Languages in any menu. )
Floating language selection ( Have a floating dropdown following the user on every page. )

For all the available language switchers you have the following options:

Flags with Full Language Names (default)
Full Language Names
Short Language Names
Flags with Short Language Names
Only Flags

Here』s a short video on how to add and customize a language switcher on your WordPress site:

Translate Site
Clicking on this tab will open the Translation Editor in the frontend of the site where you can begin translating your site.
Advanced Settings
Find out about options that help fix certain issues with integrating TranslatePress into your project here.

WPBakery Integration

WPBakery Integration

TranslatePress is fully compatible with the WPBakery page builder. If your website structure is built using WPBakery, you can easily display certain elements on a specific language or exclude it from certain languages.
After the integrations with Elementor and Oxygen Builder, WPBakery was not allowed to be missing from this list.
How to show/hide WPBakery elements based on language
In order to display or hide an element based on language TranslatePress gives you 2 options you can use:
Restrict by Language
To use this option click on the element that you want to restrict, and then go to the TranslatePress tab, where you』ll find the Restrict element to language option. Set the option to Yes and select the language in which you』d like to show the selected element.

Exclude from Language
Through WPBakery an extra option is available, Exclude from Language, through which you can display an element in all languages, except the one(s)* that you selected.

*To select multiple languages just use the Ctrl key while you selecting the languages with the cursor.

Conditional Shortcode Based on Language

Conditional Shortcode Based on Language

Things like emails sent to users by different plugins cannot be translated using the visual translation interface because they do not appear in the front-end.
For these other types of content you can use the conditinal shortcode to display content based on language:
[trp_language language="en_US"] English content only [/trp_language]
This can be done also with PHP:

Another use case of the conditional shortcode is for translating images, basically displaying different images for different languages.
[trp_language language="en_US"]

[/trp_language]
[trp_language language="fr_FR"]

[/trp_language]

However, this can now be easily achieved directly from the front-end using the built in image translation functionality.
It is also possible to use the conditional shortcode to display Gutenberg blocks only on the desired language.
To do this, you will have to wrap the Gutenberg block between two shortcode blocks. The first shortcode block will contain the start of our conditional shortcode ([trp_language language=」en_US」]) and the second block will contain the end of our conditional shortcode ([/trp_language]).

The result can be seen in the following image. The first page is the default English version and the second page is the Spanish version of the same page.

Oxygen Builder Integration

Oxygen Builder Integration

TransatePress is also compatible with Oxygen Builder, that』s why if your website is built on Oxygen, you can display certain elements in specific languages directly from the Oxygen』s interface.
How to Show / Hide Oxygen Builder Elements Based on Language
Go to the Oxygen editor interface and open the element that you want to restrict based on a language. Then, click the Condition Settings icon and then Set Conditions:

Search in the Choose Condition drop-down, and select Dynamic Data:

Then, choose PHP Function Return Value:

Set the Function Name equal to get_locale and then click Insert:

Set the value equal to the language code for the language that you want to target (this code is available by going to Settings -> TranslatePress and looking in the Code column of the All Languages section):

If you want to target another language, you can just repeat the same process to add another condition.

Also, if needed, rules to exclude entire pieces of content from translation can be used.

Elementor Integration

Elementor Integration

TranslatePress is fully compatible with Elementor, so if your website is built using Elementor, you can achieve the same functionality for widgets and sections directly from Elementor』s interface.
Restrict by Language
To use this option click on a widget or section and then go to the Advanced tab, where you』ll find the Restrict by Language option. Set the first option, Restrict element to language, to Yes and select the language in which you』d like to show the selected element.

The second option, Enable translation, is used when the restricted content is written in the default language, either directly by you or by an element like the Posts element. Keep in mind that the content has to be translated for it to be properly displayed in the restricted language.
Exclude from Language
Through Elementor an extra option is provided, Exclude from Language, through which you can make an element to be shown in all languages, except the one(s) that you selected.