WordPress Connector

WordPress Connector Install and Configure

Smartling’s WordPress Connector allows you to integrate Smartling translations into your WordPress site. The Connector uploads new content to Smartling and downloads translations to the appropriate site.


Before you can install the Smartling Connector, you need the following in your WordPress installation:

  • WordPress 4.6 or higher
  • PHP Version 7.4 or higher
  • Create a multi-site network
  • PHP extensions
    • DOM extensions
    • mbstring
    • curl
    • libxml
    • xml
    • xmlreader
    • xmlwriter
    • yaml
    • gd
  • For WP Engine hosting maximum execution time is set to 300 seconds
  • Smartling Connector writes access for the following folders:
    • smartling-connector logs directory (wp-content/plugins/smartling-connector/logs)
    • system temp
    • wordpress uploads and all subfolders (wp-content/uploads)

In Smartling, you will need a project of the CMS Connectors type.

Install Smartling Plugin

  1. Go to Network Admin > Plugins > Add new (/wp-admin/network/plugin-install.php).
  2. Type smartling in the Search Plugins box to locate the Smartling plugin.
  3. Follow the WordPress documentation to install and activate the Smartling plugin.
  4. The following error messages may be displayed. The last two will be resolved as you continue with the configuration. To resolve the Advanced Translator error, click this link in the error text.

Configure Smartling Plugin

Before you begin, you will need the following details in order to configure the Smartling plugin:
- User Identifier and Secret Token: See API Tokens.
- Project ID and target locales: You can find these while viewing your project in Smartling. Select API from the top menu, and then select the v 1.0 tab. Project Settings > API.


  1. In WordPress, go to Smartling > Settings (/network/admin.php?page=smartling-settings).
  2. Click Add Profile.
  3. In the Account Info section, set the following fields:
    • Profile Name: Enter a descriptive name for the profile.
    • Active: Select Active if you want to use this profile right away.
    • Project ID: See note at the beginning of this section.
    • User Identifier
    • Token Secret
  4. In Source Locale, select the original content site language, and then click Save changes. Saving the changes at this step will allow you to select the target locales from a list of valid locales in a drop-down box in the next step.
  5. In the Target Locales section, select the checkbox beside each target site language (not the source), and select the corresponding Smartling target language from the drop-downs.
  6. Click Save Changes to save the profile. 

Troubleshooting Installation

  1. First, go to Smartling settings (/wp-admin/admin.php?page=smartling_configuration_profile_list) and make sure that you don't have pending items for "Upload", "Check Status" and "Download"
  2. If any of the above has items, then click Process.

Did it help? Do you see new content in Smartling or translations on your target site?

  • If no, then:
    1. Open Smartling settings and click DELETE current log file
    2. Open any post\page and do one of the following:
      1. Upload it for one or more locales via Smartling widget on the right side.
      2. Alternatively, depending on your issue, download it for one or more locales via Smartling widget on the right side. 
    3. Come back to the Smartling settings and download log file and send it to support@smartling.com

Configure Smartling Plugin - Expert Settings

While creating or editing a profile, you can access an extended set of settings by clicking Show Expert Settings at the bottom of the profile page. Contact Technical Support or your Customer Success Manager before modifying these settings.

Updates to these settings will change how content is handled during the translation process. Please consult before making any changes.

Field Options and Explanations
Upload Options:
Resubmit changed content Automatically: The Connector resubmits content to Smartling whenever a change in original content is detected.

Manually: You must resubmit original content when it changes.
Force sync attachment files on upload Disabled: The connector synchronizes attachments from source to target sites only once when they are submitted the first time. This allows you to add localized images later and the connector will not override these manual changes.

Enabled: Every time attachments are submitted to Smartling they will synchronize from source to target sites. This would work well when you want all images on the target site to be replaced, for example, if all icons have been redesigned. If you resubmit attachments with this option enabled, all target site icons will be overwritten.
Auto Authorize Checked (default): Strings are authorized for translation in Smartling automatically.

Cleared: You must go to the Smartling dashboard and authorize strings for translation. When you manually authorize strings, authorize only for the locales list set up for submitting with the connector. Languages that are not on the locales list will not be tracked or retrieved.
Download Options:
Retrieval Type Pseudo: Smartling can provide pseudo translations, which is the original strings with extra characters added to increase the length by 30 percent (default). This emulates the increase in length that can occur when strings are translated, allowing you to test the expanded text before translation is completed.

Published: Only completed translations will be retrieved.
Download translated files when Translation Completed: Translations will be downloaded when they reach the Published step in a workflow.

Progress Changes: Translations will be downloaded when the connector finds that a translation in a file has been added or changed
Publish completed translation No: Post status is not affected when translations are downloaded.

Yes: Post status is set to Published after download of completed translations.
Auto synchronize properties on translated page with source

Disabled: Third-party plugins can add/remove properties for a page (these are stored in the wp_postmeta table). The default behavior is to translate all values from the wp_postmeta table and save translations for target sites. If the third-party plugin removes some properties between submits to Smartling, the removed properties will not be synchronized by the connector. This is important only if the plugin/theme depends on the changed properties.

Enabled: The connector synchronizes properties by:

  • removing all properties from wp_postmeta table of target site
  • copying all properties from source to target site
  • overwriting properties of target site with translations
Exclude fields by field name 

Fields listed will be excluded when the post is sent to Smartling for translation, and will not appear in the translations returned to WordPress. This is useful for elements that only need to exist on the source page, like post dates, comments, or comment counts.

post_modified term_group

Copy fields by field name 

Fields listed here will be copied from the source to the target locale. No translation will take place. The translated content will be the same as the source content. 

comment_status effective_date mime-type

Copy by field value

Fields that match the regular expressions listed here will be copied from the source to the target locale. No translation will take place. The translated content will be the same as the source content. This allows you to capture multiple fields using expressions instead of entering every field name in the Copy fields by field name box.

^\d+([,\.]\d+)?$ ^(http:|https:|field_) ^(taxonomy|category|\s+)$

SEO fields by field name  Field names listed here will be flagged as SEO (search engine optimization) terms in Smartling, identifying them with a special translation key so they can be translated appropriately. 

Configure WP Cron

The WordPress Connector uses WP-Cron to run regular tasks. See here for further information about hooking WP-Cron into the system task scheduler.

  1. Ensure that the domain name of your WordPress site is resolved on the server by pinging it when you’re logged in via ssh. for example:
    ping mywordpressinstallation.com

    If you get a response like "Could not resolve host: mywordpressinstallation.com", then you will need to add a record to your /etc/hosts file

  2. To configure a Cron task, edit your crontab (using the appropriate user nginx\ www-data):
    sudo -u nginx crontab -e

  3. Add a line to the end of the file:
    */5 * * * * curl http://mywordpressinstallation.com/wp-cron.php > /dev/null 2>&1
    */5 * * * * wget -O - -q -t 1 http://mywordpressinstallation.com/wp-cron.php

    This will run WordPress cron every 5 minutes. Remember to leave at least one blank line at the end of the file.

  4. Edit your wp-config.php file and add the following line:
    define('DISABLE_WP_CRON', true)

Was this article helpful?