Drupal Multilingual Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Drupal Multilingual Setup

Drupal is one of the best CMS for multilingual sites. Translation support is built into core: content, configuration, administration interface, menus, blocks, taxonomy terms are all translatable.

Required Modules (all in core)

drush en language locale content_translation config_translation -y
drush cr
  • language — base language module
  • locale — interface translation
  • content_translation — content translation (nodes, taxonomies, blocks)
  • config_translation — configuration translation (field labels, content types)

Adding Languages

Configuration → Languages → Add language. Drupal automatically downloads interface translations from drupal.org.

URL pattern configuration: Configuration → Languages → Detection and selection:

  • URL prefix: ru/, en/ — recommended
  • Domain: ru.site.com, site.com — for large multilingual sites

Enabling Translation for Content Type

Configuration → Content language → select content type → enable translation for each field individually.

Or programmatically:

// Enable Content Translation for all 'article' type fields
$config = \Drupal::configFactory()->getEditable('language.content_settings.node.article');
$config->set('third_party_settings.content_translation.enabled', TRUE)->save();

Creating Translation via API

use Drupal\node\Entity\Node;

// Load original node (English)
$node = Node::load(42);

// Add translation
if (!$node->hasTranslation('ru')) {
    $translated = $node->addTranslation('ru', [
        'title' => 'Заголовок на русском',
        'body'  => ['value' => '<p>Текст на русском</p>', 'format' => 'full_html'],
        'status' => 1,
    ]);
    $translated->save();
}

Twig: Language-Aware Display

{# Get current language #}
{% set current_lang = language.getId() %}

{# Language switcher links (use Views Language Switcher instead) #}
{% for language in languages %}
    <a href="{{ path('<current>', {}, {'language': language}) }}"
       hreflang="{{ language.getId() }}"
       {% if language.getId() == current_lang %}class="active"{% endif %}>
        {{ language.getName() }}
    </a>
{% endfor %}

Configuration Translation

Field labels, content type descriptions, button text — translated via Configuration → Translations. Or via export:

drush config:export
# Edit locale/*.po files
drush locale:import en /path/to/en.po

Menus and Blocks

Each menu item is translated separately via Structure → Menus → [menu] → Edit → Translate. Blocks: Structure → Block placement → [block] → Translate.

URL Aliases for Translations

Pathauto creates aliases for each translation separately: /about (en), /uk/про-нас (uk). Configuration: Configuration → Pathauto → patterns include [node:language].

hreflang for SEO

Drupal automatically adds <link rel="alternate" hreflang="..."> for all translations via Metatag module:

composer require drupal/metatag
drush en metatag -y

Timeline

Basic multilingual setup for 2–3 languages with content type and interface translation — 2–3 days. Full multilingual configuration with URL patterns, hreflang, and menus — 4–5 days.