דלג לתוכן דלג לסרגל צד
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 -

אזור זמן של התומך: Asia/Kathmandu (GMT+05:45)

נושא זה מכיל 0 תגובות, יש ל 1 קול.

עודכן לאחרונה על ידי walkmew לפני חודש 5, שבוע 1.

בסיוע: Shekhar Bhandari.

מחבר פוסטים
30 באוקטובר 2025 ב-5:06 #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?

הנושא '[סגור] Default Values in Custom Gutenberg Blocks Not Translatable' סגור לתגובות חדשות.