Overview

Translatable paragraph fields on the parent entity are not supported. This might sound confusing or misleading, but it depends on where the translatable option is enabled. Fields on the paragraph item entity can be translatable, but not the paragraph field on the parent entity *.

There are solutions to fix this issue. However, they are all manual, which can cause mistakes or lack of content. Therefore, we came up with the idea of creating a module that fixes the phenomenon of adding new on the original language page but not showing for editing in other language pages automatically.

1. General Information

  • The usable Drupal version: D9 and D8
  • Multilingual module
  • Inherit from TB Megamenu D7.
  • Helps with translation fields 'Inline entity form - Complex' widget.

2. Issue of Translation of Paragraphs

Translatable paragraph fields on the parent entity are not supported. This might sound confusing or misleading, but it depends on where the translatable option is enabled. Fields on the paragraph item entity can be translatable, but not the paragraph field on the parent entity (e.g. Node, Taxonomy term, ...).

When activating translation on the parent entity on the "Content language" settings page at admin/config/regional/content-language, the default setting of paragraph fields is the wrong one. You should disable the translatable option immediately.

 

Temporal Solution

To correctly enable the translation of paragraphs, click paragraphs on top of the "Content language" page (admin/config/regional/content-language) then scroll down (without saving!) to the Paragraphs section of the page and, for each paragraph type, check the fields you want to enable translation for. By default, all fields will be checked - which might not be correct!

All paragraph types must be marked as translatable, including container paragraph types that only have an untranslatable paragraph field for nested paragraphs. Otherwise, it is not possible to translate nested paragraphs in these fields.

If the translation doesn't seem to work after these steps, make sure you did clear Drupal's cache.

INSTALLATION

How to install Inline Entity Form Translation module

Log into your site.

In menu admin: Choose Extend > Add new module.

There are two ways of installation.

Method 1: Install from a URL.

1. Access to the website: https://www.drupal.org/project/inline_entity_form_translation

2. Right-click on the link to get the URL and select Copy link address

3. Go back to the module settings page. In the Add from a URL line, right-click and select Paste

4. Click the Continue button to install module Inline Entity Form Translation

Method 2: Upload a module or theme archive to install.

1. Download Module at site: https://www.drupal.org/project/inline_entity_form_translation/releases/1.0.x-dev

2. Go back to the module settings page. Click Choose File button and choose a file that has name inline_entity_form_translation-1.0.x-dev

4. Click the Continue button to install module Inline Entity Form Translation

Activate the Inline Entity Form Translation module

1. In menu admin: click Extend

2. The module list is displayed. Search the module that has the name Inline Entity Form Translation (in Multilingual). And click the checkbox in front of it.

3. Click Install Activate module Entity Form Translation

SETUP

In menu admin, click Configuration > Inline Entity Form Translation

Choose configuration for your site, click Enable checkbox, and Save.

DEMO

Create a new page by clicking Content in the menubar, choose option Add content > News

Create a new section Demo of IEFT and add information then Save

Click the Translate tab to add a new language to the page

Choose a language, here we have 2 available languages, for example, pick Japanese.

Create content in Japanese:

1. Name of the section in the Japanese language

2. Edit the section to the Japanese language

and Save

Back to the original language to add more sections by clicking the Translate tab

To add a new section, back to the original language page

Edit News Demo of IEFT

Save the new section

Here is the result of adding a new section

Now repeat to click the Translate tab and add content for the Japanese language page in the second section.

Then Save

Here is the result

DISABLE MODULE

To disable the module, in menu admin, click Configuration > Inline Entity Form Translation

Click again on Enable checkbox to Disable and Save.

*Source: Multilingual Paragraphs configuration