Search by

vectorbross / vb_multilingual

vectorbross

Config actions that apply the Vector BROSS translation defaults to every translatable entity type.

Package info

bitbucket.org/vectorbross/vb_multilingual

Type:drupal-custom-module

pkg:composer/vectorbross/vb_multilingual

Statistics

Installs: 3

Dependents: 1

Suggesters: 0

1.0.0 2026-10-02 06:50 UTC

This package is not auto-updated.

Last update: 2026-10-02 19:42:03 UTC


README

Applies the Vector BROSS translation defaults to every translatable entity type. A recipe can only contain static configuration, so this module provides the logic as config actions for vb_multilingual_recipe and as a Drush command.

Translation defaults

The defaults are stored in vb_multilingual.settings:

  • Entity types: every entity type that supports content translation gets translation enabled for all of its bundles, except exclude_entity_types (user, crop, path_alias, redirect, comment, …).
  • Fields: configurable fields are translatable, except the untranslatable_field_types (entity references, files, images, webforms, comment settings), which are shared between the translations. The Layout Builder overrides (layout_builder__layout) are only translatable when layout_builder_at is installed, Layout Builder itself does not support it.
  • Language selector: shown on the create and edit forms of the language_selector_entity_types (node, taxonomy_term), directly beneath the title, also inside a field group. On the forms of the other entity types an existing language field is moved beneath the title as well.
  • Layout Builder: with layout_builder_at, the default form display gets the "Copy blocks into translation" widget.
  • TMGMT: with tmgmt_content, the entity reference fields of the embedded_references (child blocks of blocks) are translated together with their parent.

Every step only adds or corrects configuration, so the defaults can be applied as often as needed.

Config actions

config:
  actions:
    vb_multilingual.settings:
      # A list or a comma separated string of language codes.
      vb_multilingual_add_languages: 'fr,en'
      # Optional overrides of vb_multilingual.settings, they are stored.
      vb_multilingual_apply:
        language_selector_entity_types: [node]

Drush

After adding a content type, vocabulary or field, apply the defaults again and export the configuration:

drush vb-multilingual:apply
drush config:export

Tests

SIMPLETEST_DB=sqlite://localhost//tmp/vb_multilingual.sqlite vendor/bin/phpunit -c web/core web/modules/vectorbross/vb_multilingual/tests