Skip to content

Installation Guide

This guide will walk you through the process of installing and configuring the String module.

Prerequisites

Before installing the String module, ensure you have:

  • A working Drupal 10.3 or 11.x installation
  • PHP 8.1 or higher
  • Composer installed
  • Drush installed (optional, but recommended)

Installation Methods

  1. Navigate to your Drupal root directory:

    cd /path/to/drupal
    

  2. Install the module using Composer:

    composer require drupal/string
    

  3. Enable the module using Drush:

    drush en string
    

Or through the Drupal admin interface: - Go to Extend (/admin/modules) - Find "String" in the list - Check the box and click "Install"

Manual Installation

  1. Download the latest release from Drupal.org
  2. Extract the archive to your Drupal's modules directory
  3. Enable the module through the Drupal admin interface or using Drush

Configuration

Basic Configuration

  1. Navigate to the String module settings:
  2. Go to Configuration → Regional and language → String settings
  3. Or visit /admin/config/regional/string

  4. Configure the following settings:

  5. String export format
  6. Default string namespace
  7. Translation workflow settings

Permissions

The module adds several permissions that you may want to configure:

  • manage string export: Allows users to export string translations
  • import string translations: Allows users to import string translations
  • administer string settings: Allows users to configure the module

To configure permissions: 1. Go to People → Permissions (/admin/people/permissions) 2. Find the "String" section 3. Configure permissions for each role

Verification

To verify the installation:

  1. Check the status report:
  2. Go to Reports → Status report (/admin/reports/status)
  3. Look for the String module in the list

  4. Test the basic functionality:

  5. Create a test string in your custom module
  6. Verify it appears in the string management interface
  7. Try exporting and importing translations

Troubleshooting

If you encounter any issues during installation:

  1. Check the Drupal error log
  2. Verify all prerequisites are met
  3. Clear the Drupal cache:
    drush cr
    
  4. Check the issue queue for known issues

Next Steps

After installation, you may want to:

  1. Review the Quick Start Guide
  2. Learn about Basic Usage
  3. Configure String Management
  4. Set up Translation