Skip to content

Installation

Requirements

Installation Steps

1. Install Dependencies

# Using Composer
composer require drupal/tmgmt drupal/sm drupal/key

# Enable modules
drush en tmgmt sm key

2. Install TMGMT Lara Translate

# Using Composer
composer require drupal/tmgmt_laratranslate

# Enable the module
drush en tmgmt_laratranslate

3. Verify Installation

  1. Go to Extend (/admin/modules)
  2. Confirm "Lara Translate Provider" is enabled
  3. Check that TMGMT and SM modules are also enabled

4. Configure Symfony Messenger

The module uses Symfony Messenger for asynchronous processing. Verify the messenger configuration:

# Check messenger configuration
drush config:get messenger.settings

The module automatically registers its message handler, but you may want to configure transports for production use.

5. Set Up Lara API Credentials

  1. Go to Configuration → System → Keys (/admin/config/system/keys)
  2. Add two new keys:
  3. Lara Access Key ID (type: API Key)
  4. Lara Access Key Secret (type: API Key)
  5. Store your Lara API credentials securely in these keys

6. Configure the Translator

  1. Go to Configuration → Translation Management → Providers (/admin/config/regional/tmgmt_translator)
  2. Click Add translator
  3. Select Lara Translate from the dropdown
  4. Configure:
  5. Name: Give your translator a descriptive name
  6. Credentials: Select the keys created in step 5
  7. Language mappings: Configure custom mappings if needed
  8. Translation options: Set default style, instructions, etc.

7. Verify Configuration

  1. Go to Configuration → Translation Management → Providers
  2. Click on your Lara translator
  3. Check that it shows "Available" status
  4. Test with a small translation job

Next Steps

Troubleshooting

If you encounter issues during installation: - Check that all required modules are enabled - Verify your Lara API credentials are correct - Ensure your server can reach Lara's API endpoints - Check Drupal logs for error messages

See Troubleshooting Guide for more detailed help.