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?
主题'[關閉] Default Values in Custom Gutenberg Blocks Not Translatable'已关闭,不接受新回复。