We've launched a new support center at help.smartling.com. This site will continue to be maintained into January 2017. Please update your bookmarks.
Follow

Drupal CMS Connector Installation and Configuration

The following article applies to CMS Connector project types. 

Installation

You can either install the Connector manually, using Drush, or via the Drupal interface.

More information on installation at Drupal.org.

To upload the Drupal CMS Connector module manually:

  1. Install Drush. For more information, see How to Install Drush.
  2. Copy the Smartling CMS Connector module zip archive to the root folder of the Drupal site.
  3. Browse to the root folder of the Drupal site.
  4. Execute
    drush dl smartling -y
  5. Optionally, you can install the module with demo content. The module adds three locales and creates 10 nodes with content.
    drush en smartling_demo_content -y
  6. Configure the cron task. For more information on how to configure cron, see the Drupal Documentation.

    6.1.  Edit your crontab (use appropriate user - nginxx / www-data)
    sudo -u nginx crontab -e

    6.2. To the end of your crontab file, add
    */1 * * * * drush --root=/var/www/vhosts/drupal_pma --uri=http://<your.domain> cron --quiet &> /dev/null
    It is important to set the --uri parameter correctly, or your callbacks will not work.

    6.3. Restart your crontab with
    /etc/init.d/crond restart

 To upload the Drupal CMS Connector module via the Drupal interface:

  1. Login to Drupal as an Administrator and browse to Menu > Modules > Install new module.
  2. Upload the Smartling CMS Connector module zip archive.
  3. Click Install and Drupal installs the module in the sites/all/modules folder.

To verify the Drupal CMS Connector installation:

  1. Navigate to the Modules list page at Menu > Modules.
  2. Scroll down and find the Smartling modules.

Configuration

To configure the Drupal CMS Connector:

(1) Login to Drupal as an Administrator and browse to Menu > Configuration >Regional and language > Smartling settings.

  • Enter your Smartling Project Id and API Key, found in the Smartling Dashboard at Project Settings > API.
  • Select a Retrieval type. You can read more about Retrieval type in Smartling Files API documentation
  • Check the Target Locales you want to translate with Smartling and enter the Smartling locale code. That locale must be enabled in your Smartling project.
  • You can have Smartling send a callback to your Drupal instance to download translated items as soon as they become available, rather than waiting for the scheduled download process to pick them up. For this to work, your instance must be publicly addressable. Check Use Callback URL to enable.
  • Automatically authorize content for translation in Smartling - if checked, when you submit translations, content will automatically be authorized instead of being added to your Awaiting Authorization queue.

Clicking Test connection makes a request to the Smartling API and validates the Project Id, API Key and all Target locales and saves all settings.

(2) In the Nodes tab, set the Translation Type for each content type to Nodes method, unless you have specifically configured Field translation via the Drupal API. Select which fields you want to translate for each content type.

 

(3) Configure Cron settings. By default, the Connector module checks translation status in Smartling every hour.

You can change the schedule at Menu > Configuration > System > Cron. Just find the tasks under the Smartling module and select edit from the Operations menu next to the task you want to update.

 

To configure Context:

The Drupal Connector can generate dynamic HTML context for the nodes you submit for translation. Context lets translators see what their translations will look like on the page, helping them provide quality translations that fit space requirements.

(1) Set the username the Connector will use to access your content and create context. Be mindful of the permissions of a user you choose. An administrator may see tools/content not displayed to other viewers.

(2) Enter any CSS/JS files that should be excluded from submissions. Context is captured as static HTML and use of, for example, responsive show/hide elements may lead to poor context being captured. Enter paths to any CSS/JS files you want to ignore while capturing context.

(3) To help you debug files that are causing problems, you can add problem URLs to the Debug Fields section. If you check Preview, the connector will display page context for each URL without submitting to Smartling to help you debug context issues.

 

Uninstall

Via Drush:

Execute

drush dis smartling -y
drush pm-uninstall smartling -y

Via the Drupal interface:

  1. Login to Drupal as an Administrator and browse to Menu » Administration » Modules.
  2. Disable the following modules:
    • Smartling demo content
    • Smartling reports
  3. Disable the Smartling module.
  4. Browse to Menu > Administration > Modules > Uninstall.
  5. Uninstall all Smartling modules.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk