Closed (fixed)
Project:
Custom Field
Version:
4.0.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Dec 2025 at 21:47 UTC
Updated:
27 Dec 2025 at 18:21 UTC
Jump to comment: Most recent
Comments
Comment #2
giuse69 commentedProbably the configuration of the flexbox widget (when sub fields labels are again to be specified) overrides the field translation
Comment #3
apmsooner commentedThe manage form display settings label takes priority over default label. You should set that translated value and expect that for the form element label. Can you verify that works for you?
Comment #4
giuse69 commentedHi, but how can the flexbox parameters be translated..?
Comment #5
apmsooner commentedI'm not sure what you mean. Are you asking how the flexbox dropdown options would get translated ie; "1 column", "2 columns", etc..? If so, those would be handled in the /admin/config/regional/translate section. You would need to enable interface translations module. Id that doesn't answer your question, please provide more info or screenshare perhaps because I'm unsure of what is missing for you.
Comment #6
giuse69 commentedHi, as the title says, I am referring to the labels of the subfields. They are translated in the "manage fields" tabs and the translations works for display, while in the manage form the flexbox widget requires to specify again the labels of each subfields and these override the translation done, so in the form display the labels of subfields are always taken from the configuration of the flexbox so they are the same in each language. The subfields labels are not translatable in admin/config/regional/translate.
Did I succeed in explaining the problem?
Cheers
Comment #7
apmsooner commentedAhh, I think I understand and it seems this is a known limitation that is a work in progress in Core here: https://www.drupal.org/project/drupal/issues/2546212. I havn't tested the patch. Which version of core are you on?
Comment #8
apmsooner commentedI wonder if for now I could look at making the label optional in the form display settings so it uses the fallback from the field settings form which is translatable?
Comment #10
apmsooner commentedComment #11
apmsooner commentedTry the patch which makes the form element labels in display optional and therefore use the field settings label (which is translatable) as fallback. Let me know if this works for you.
Comment #12
giuse69 commentedhi, now labels in the flexbox are never used, both when left blank but also when filled - is it the desired behavior?
Comment #13
apmsooner commentedNo, they are supposed to be used if they are set. I just tested again and verified that myself. Can you shared screenshots of exactly where you are seeing this?
Comment #14
giuse69 commentedhi, here you have:
-) the configuration of the custom field "Base info" with subfields "type" and "status": https://bit.ly/3MLYeUg and https://bit.ly/4akishG
-) the modified code with the fix: https://bit.ly/4q92tHK
-) the configuration of the flexbox: https://bit.ly/4pO5Nsi
-) how the node form appears not using the labels of the flexbox: https://bit.ly/3KYJ1yw
Comment #15
apmsooner commentedI can't reproduce your issue and not sure I understand the modified code fix screenshot. That doesn't match the actual patch here: https://git.drupalcode.org/project/custom_field/-/merge_requests/192.diff so not sure if you are doing something in addition to the patch or what but the code is definitely working on my end for the fallback value. Maybe reapply the patch and clear cache or something and make sure you don't have any manually modified files in the module.
Comment #16
giuse69 commentedYou are right: I reapply the patch and now it works. Sorry for message #14.
For me it's ok!
Comment #17
apmsooner commentedThank you for testing.
Comment #19
apmsooner commented