Integrations

Drupal (TMS)

Available for

  • Ultimate and Enterprise plans

Get in touch with Sales for licensing questions.

Supported Versions

The Phrase Translation Plugin for TMGMT (Translation Management Tool) supports both Drupal 7 and Drupal 8/9. It can be used to translate all Drupal text elements supported by the TMGMT module.

Note

Some HTML tags present a risk and the CAT editor removes them from this HTML when displaying the preview. This is to ensure user's data privacy and security.

Examples of removed tags include FORM, IFRAME, SCRIPT, SVG, VIDEO, EMBED, OBJECT or background-image CSS properties.

Phrase Settings

  1. From the Settings Setup_gear.png page, scroll down to the Integrations section.

  2. Click on Connectors.

    The Connectors page opens.

  3. Click New.

    The Create Connector page opens.

  4. Enter the Host.

    Use the host address of the Drupal installation (e.g., http://drupal-9.kos.phrase.com/).

    The domain name must be resolvable externally (not an intranet domain).

  5. Enter the Username and Password.

  6. To modify links contained in page HTML, provide URL rewrite rule in regexp.

    Example:

    To replace a full locale code with just the language code in https://example.org/en-us/images/sample.jpg, find /([a-z]{2})-[a-z]{2}/ and replace it with /$1/.

    Links in the tags <img src="" data-lazy-src="", <link href="", <script src="", <iframe src="" and links in CSS styles and referenced CSS files (url: ('')) will be rewritten.

  7. Click Save.

    The connector is added to the list on the Connectors page.

Configure In-Context Preview

The In-context Preview feature offers a real-time preview of original or translated text in both the CAT web editor and CAT desktop editor.

In order to offer the real-time preview, Phrase it must have access to unpublished pages in an on-premise author node.

Phrase Requirements:

  • Pass through the enterprise firewall to access the on-premise installation.

  • Authenticate into the authoring environment.

Firewall Configuration for On-premise installation:

  • Installation must be accessible from the following IP addresses:

    34.243.87.13, 34.248.197.209, 108.129.22.31, 3.248.158.93

  • Domain name must be able to be resolved externally.

Note

Some HTML tags present a risk and the CAT editor removes them from this HTML when displaying the preview. This is to ensure user's data privacy and security.

Examples of removed tags include FORM, IFRAME, SCRIPT, SVG, VIDEO, EMBED, OBJECT or background-image CSS properties.

Using Phrase with TMGMT

To use Phrase with TMGMT, follow these steps:

  1. Install the TMGMT module on the Drupal site.

  2. Install the Phrase Translation Plugin for TMGMT available here.

Once installed, the Phrase Plugin will be available in the list of providers.

Use Drupal/WordPress XLIFF as the File Type in the Project Template used with Drupal plugin.

Add Phrase as a Translation Provider to Drupal 7

  1. Log into the Drupal 7 account with the TMGMT plugin installed.

  2. Navigate to Configuration and click Translation Management Translators under the Regional and language section.

    The Translation Management Translators screen opens.

  3. Click on Add Translator.

  4. Add a label name and description.

  5. Under the Translator plugin, select Phrase Connector for Drupal.

    Phrase specific settings are displayed and the Phrasee Home URL field is pre-populated with https://cloud.memsource.com/web.

  6. Enter Phrase username and password.

  7. Optional: Specify Remote Languages Mappings.

    This allows the mapping of languages with ones available on the site (as configured in Languages under the Regional and language section).

  8. Click Save translator.

    Translator configuration is created.

Translate Content in Phrase - Drupal 7

  1. In the Drupal account, click the Translation menu item and select the Sources tab.

  2. Check the checkbox next to the content to be translated.

    Note

    If document not visible, verify document language is set to source language.

  3. Click Request translation button.

  4. Choose the target language.

  5. In the dropdown list, under Translator, select the Phrase configuration.

  6. Wait for the Checkout settings to load and choose your Project template.

    Note

    Only project templates that match your source language and include all target languages are listed.

  7. Click Submit to translator.

    Translation project is created in Phrase based on the chosen project template.

  8. Wait for the translation to complete in Phrase.

  9. Click the Translation menu item and on the Jobs tab select the document that has been completed.

  10. Click the manage link for the given document.

  11. Click the Pull translations button.

    Translations are received back from the Phrase project.

  12. Review if necessary.

  13. After review, publish the translations.

Add Phrase as a Translation Provider to Drupal 8/9

  1. Log into Drupal 8/9 account with the TMGMT plugin installed.

  2. Navigate to Translation and click Providers.

    Providers screen opens.

  3. Click on Add provider.

  4. Add a label name and description.

  5. Under Provider plugin, select Phrase.

    Phrase specific settings are displayed and the Phrase Home URL field is pre-populated with https://cloud.memsource.com/web.

  6. Enter Phrase username and password.

  7. Click Connect.

    Connection is established

  8. Optional: Specify Remote Languages Mappings. This allows the mapping of languages with ones available on the site (as configured in Languages under the Regional and language section).

  9. Click Save.

    Provider is created

Translate Content in Phrase - Drupal 8/9

  1. In the Drupal account, click the Translation menu item and then Sources.

  2. Check the checkbox next to the content to be translated.

    Note

    If document not visible, verify document language is set to source language.

  3. Choose the source and target languages and click Request translation.

    The Job overview page opens.

  4. Select the Phrase configuration as the Provider.

  5. In the Checkout Settings, specify the Project template to be used (if any) and the Due Date.

    • Only project templates that match the source language and include all target languages are listed.

    • The Due Date represents EOD and is converted to the Phrase user's timezone.

    • Select both Group all translation jobs in a single Phrase project and Submit all # translation jobs with the same settings to group all target languages into a single project.

  6. To order the translation, click Submit to provider.

    Translation project is created based on the chosen project template.

  7. Wait for the translation to complete.

  8. Click the Translation menu item and on the Jobs tab select the completed document.

  9. Click the Manage button for the given document.

  10. Click the Pull translations button.

    Translations are received back from the project and the job status is changed to Delivered.

  11. Review if necessary.

  12. After review, publish the translations.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.