Accessing the TranslatePress Advanced settings
To access the TranslatePress Advanced settings, navigate to WP Dashboard Settings → TranslatePress, and choose the Advanced tab.
The sections found in the Advanced settings are mostly useful for fixing issues that may occur while integrating TranslatePress into your site. Those sections with their options are the following:
- Fix missing dynamic content
- Disable dynamic translation
- Filter Gettext wrapping from post content and title
- Filter Gettext wrapping from post meta
- Exclude Gettext Strings
- Exclude from dynamic translation
- Exclude selectors from translation
- Exclude strings from automatic translation
- Exclude selectors only from automatic translation
- Do not translate certain paths
- Disable post container tags for post title
- Disable post container tags for post content
- Disable translation for gettext strings
- Show regular strings tab in String Translation
- Optimize TranslatePress database tables
- Remove duplicate hreflang
- HTML Lang Attribute Format
- Automatic Translation Memory
- Force slash at end of home_url
- Translate numbers and numerals
- Exclude translated links from sitemap
- Enable the hreflang x-default tag for language
- Date format
- Show opposite language in the language switcher
- Open language switcher only on click
- Marketing optin
Troubleshooting section
Exclude strings section
Debug section
Miscellaneous section
Custom language
Troubleshooting section
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 the original language for a moment before the translation request is finished.
2. Disable dynamic translation
It disables the 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. 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.
4. 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.
Exclude strings section
1. 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 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 the list.
2. 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 the list.
3. 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 the list.
4. Exclude strings from automatic translation
Do not automatically translate these strings (ex. names, technical words…)
Paragraphs containing these strings will still be translated except for the specified part.
After entering the string, click the Add button in order to exclude it from being processed by automatic translation engines. Removing strings from the list is also possible using the Remove button next to each one of them.
Note: In order for the exclusion to take effect, strings must be added to the list before starting the translation process.
5. Exclude selectors only from automatic translation
Do not automatically translate strings that are found in HTML nodes matching these selectors.
Excludes all the children of HTML nodes matching these selectors from being automatically translated.
Manual translation of these strings is still possible.
Do not use not() selector or double attribute selector [attribute1][attribute2].
After entering the selector, click the Add button in order to exclude all its children from being processed by automatic translation engines. Removing selectors from the list is also possible using the Remove button next to each one of them.
Note: In order for the exclusion to take effect, selectors must be added to the list before starting the translation process.
6. 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 its 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.
Debug section
1. Disable post container tags for post title
It disables search indexing the post title in translated languages.
Useful when the title of the post doesn’t allow HTML thus breaking the page.
2. Disable post container tags for post content
It disables search indexing the post content in translated languages.
Useful when the content of the post doesn’t allow HTML thus breaking the page.
3. Disable translation for gettext strings
Gettext Strings are strings outputted by themes and plugins.
Translating these types of strings through TranslatePress can be unnecessary if they are already translated using the .po/.mo translation file system.
Enabling this option can improve the page load performance of your site in certain cases. The disadvantage is that you can no longer edit gettext translations using TranslatePress, nor benefit from the automatic translation on these strings.
4. Show regular strings tab in String Translation
Adds an additional tab on the String Translation interface that allows editing translations of user-inputted strings.
5. Optimize TranslatePress database tables
This feature allows you to clean the database tables regarding duplicate rows, untranslated links, and CDATA.
Miscellaneous section
1. Remove duplicate hreflang
Choose which hreflang tag(s) will appear on your website: Country Locale (en-UK), Region Independent Locale (en), or both. By default, both the Country and the Region Independent Locale are displayed (recommended).
2. HTML Lang Attribute Format
Change the lang attribute of the html tag to a format that includes country regional or not.
In HTML, the lang attribute () should be used to specify the language of text content so that the browser can correctly display or process your content (eg. for hyphenation, styling, spell checking, etc).
3. Automatic Translation Memory
If checked, this setting will enable the searching for similar strings on the website and automatically complete the translation of one or more similar strings, if the translation for one of them exists. The similarity percentage needs to be over 95% and the minimum of character a string should have to be considered for this feature is 50 characters. The feature does not work on translation blocks.
4. Force slash at end of home_url
Ads a slash at the end of the home_url() function.
5. 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.
6. Exclude translated links from sitemap
Do not include translated links in sitemaps generated by SEO plugins.
Requires SEO Pack Add-on to be installed and activated.
7. Enable the hreflang x-default tag for language
Enables the hreflang=”x-default” for an entire language.
8. 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.
9. Show opposite language in the language switcher
Transforms the language switcher into a button showing the other available language, not the current one.
Only works when there are exactly two languages, the default one and a translation one.
This will affect the shortcode language switcher and floating language switcher as well.
To achieve this in the menu language switcher go to Appearance->Menus->Language Switcher and select Opposite Language.
10. Open language switcher only on click
Open the language switcher shortcode by clicking on it instead of hovering.
Close it by clicking on it, anywhere else on the screen, or by pressing the escape key. This will affect only the shortcode language switcher.
11. Marketing optin
Opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking.
Custom language section
With the same name as the section, 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 be 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.