Supporting Development workflows (Drupal 8)

One common need developers face when integrating the Lingotek module into their Drupal 8 sites is how to manage different configurations for their different environments: development, staging or production.

Like with other external integrations, like SMTP server information for sending (or not) your site emails, or LDAP authentication providers, you may want to have different settings for your Lingotek connection. All of the existing best common practices in Drupal 8 for managing those environment configurations would work here, let’s see some of these options.

If you want to expand or request information in any of those, or a different way you keep your configuration between different environments, please reach us at integrations@lingotek.com.

Common considerations

Take into account that your Lingotek profiles can override some of the settings there, e.g., the workflow to use. In that case, you would need to also override the profile configuration.

When managing your documents and translations, Lingotek uses different identifiers for tracking documents in your site and the Lingotek TMS. If you already have tracking information, you would need to disassociate all the content. For that, *** after changing your settings for connecting to a different environment ***, you can Disassociate All Translations in the Lingotek settings page in your site, under the Utilities section.

Overriding configuration in settings.php / settings.local.php

This is probably the easiest way of overriding your settings, and can be used when those changes are few and simple, which are the more common. E.g. connecting to a different environment, but keeping the same settings.

For doing that, you can override the UUIDS of the community, project, default workflow or default vault you want to use in this environment.

Just define these (or the ones you need) in the different environments. For example, you may want to setup your account with the data for connecting to your production server, but in your staging site you want to connect to a different environment.

Edit your staging settings.php (or settings.local.php if you are already using one), and append:

1 2 3 4 $config['lingotek.settings']['default']['community'] = 'uuid-of-testing-community'; $config['lingotek.settings']['default']['project'] = 'uuid-of-testing-project'; $config['lingotek.settings']['default']['workflow'] = 'uuid-of-testing-workflow'; $config['lingotek.settings']['default']['vault'] = 'uuid-of-testing-vault';

The uuids that you should fill in can be seen in the TMS itself, under the Settings tab. For example, for finding my Project UUID:

Take into account that your Lingotek profiles can override some of the settings there, e.g., the workflow to use. In that case, you would need to also override the profile configuration.

Config split

TBD