Passer au contenu Passer à la barre latérale
Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Fuseau horaire du support : Asia/Kathmandu (GMT+05:45)

Ce sujet contient 0 réponses, a 1 voix.

Dernière mise à jour par walkmew Il y a 2 mois.

Assisté par: Shekhar Bhandari.

Auteur Messages
octobre 30, 2025 à 5:06 am #17531093

walkmew

Background of the issue:
I have created several custom Gutenberg blocks in my WordPress project, some of which have default values defined in their attributes. For example, a custom block for a CTA button has an attribute 'ctatext' with a default value of 'Request a Demo'. I have added this attribute to the wpml-config.xml file as follows: . I expected the default value to appear as a translatable string in WPML when I send the page for translation, even if the value has not been manually changed in the editor.

Symptoms:
The default value is not detected by WPML for translation. Only when I manually change the text in the Inspector Control does WPML pick it up as a translatable string. It seems WPML only recognizes attributes that have been explicitly modified in the editor, not those that use their default values defined in the block registration.

Questions:
How can I make default attribute values in custom Gutenberg blocks recognized and translatable by WPML without requiring manual edits?

Le sujet '[Fermé] Default Values in Custom Gutenberg Blocks Not Translatable' est fermé aux nouvelles réponses.