Integrations

Drupal (TMS)

Content is machine translated from English by Phrase Language AI.

Available for

  • Business and Enterprise plans

Get in touch with Sales for licensing questions.

Available for

  • Ultimate and Enterprise plans (Legacy)

Get in touch with Sales for licensing questions.

Supported Versions

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

Phrase TMS 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 connector.

    The Create connector page opens.

  4. Provide a name for the connection and change the Type to Drupal Live Preview .

  5. 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).

  6. Enter the Username and Password.

  7. To modify links contained in page HTML, provide URL rewrite rule in regex.

    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.

  8. 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.

Tables, columns, various graphics, formatting, and fonts are supported. The feature is meant to provide context when translating and is not a perfect representation of the original or completed document; some visual differences are expected. It can also be influenced by enabling/disabling Allow loading of external content in editors option in Access and Security settings.

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 integrate Phrase with TMGMT, follow these steps:

  1. Install the TMGMT module on the Drupal site.

  2. Install the Phrase Translation Plugin for TMGMT.

  3. Keep Auto-select as the File type and select Use HTML subfilter in XLIFF 1.2 in the file import settings of the project template.

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

File Attachment Translation Support

Minimum version requirements

  • Drupal 10.2

  • TMGMT plugin version 8.x-1.16

  • Phrase plugin version 8.x-1.24

To enable support of file attachments translation, follow these steps:

  1. Go to Phrase plugin settings in the translation provider configuration in Drupal.

  2. Disable the Auto accept finished translations checkbox.

  3. Enable the Enable translation of file attachments checkbox.

  4. Configure supported file types in TMGMT plugin translation settings under File translation MIME type.

When enabled, attachments matching selected MIME types are sent to Phrase TMS for translation along with page content. Separate jobs are created for the main content and each individual attachment.

Note

  • Whenever attachments of the new type are added to the Drupal project, they need to be selected in the TMGMT plugin configuration to enable file translation of the new format.

  • DueDate settings apply only to the main job, not to attachments.

  • The File translation form allows selecting MIME types, but after submission the form refreshes without displaying the selected values, although they are correctly saved and applied. This is a known Drupal issue.

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 the source language and include all target languages, including locales, 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/10/11

  1. Log into Drupal 8/9/10/11 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/10/11

Note

Due to continuous improvements, the user interface may not be exactly the same as presented in the video.

  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, including locales, are listed.

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

    • 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.