Translate only text field

Created on 10 March 2023, about 2 years ago

Problem/Motivation

We use this field for product specifictions. Reference field is used for the label and is translated at the referenced term. The other field is a text field representing the value, which we would like to translate. But I cannot seem to find where to set it. If I set the reference value field to translatable, also the term is translatable and you have to configure all the specifications per language (adding a few specifications would mean adding them to every translation seperately). We want to only translate the value of the field; not the label. That would mean all fields can be added in one language and only the text fields that need translations, can be translated in the translated version of the node.

Steps to reproduce

Proposed resolution

Add possibility to translate only the text field instance.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

User interface

Created by

🇳🇱Netherlands jeroen dost

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jeroen dost
  • 🇳🇱Netherlands jeroen dost

    LS,

    I guess, the answer will be "won't fix", because it has to be light weighted compared to Paragraphs. So we probably need to work around that. Has anyone tried to solve this problem? Copying the field from the source language when the source changes? Or a button adding this feature? Or other options?

    Thanks in advance!

  • 🇬🇷Greece vensires

    It indeed seems as a "won't fix" but we might have a workaround which could even play fine in every website I think.
    We could use the field type's preSave() function and make sure that even though the whole field is translatable according to Drupal settings, for each translation we get the value from the source and copy it over to the other translations. It is indeed a duplication of the value but might work.

    Of course, translatable fields get displayed in every language so I don't think we could hide it somehow like normally done for non-translatable fields. Field properties are not the same as Fields, so we don't have the same functionalities. It's an approach that might work though if anyone is interested.

Production build 0.71.5 2024