Closed (fixed)
Project:
Entity Form/Display Field Label
Version:
8.x-1.5
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 May 2021 at 13:20 UTC
Updated:
6 Jun 2022 at 11:24 UTC
Jump to comment: Most recent
Comments
Comment #2
nikita_ttHi. I use this module for my own sites and recently I faced the same problem. Below you can find how I resolved it.
In my case, I have an entity type (custom but it doesn't matter) and a field (BaseField but it doesn't matter as well) that has rewritten label in one of the Form Modes.
See settings for the
applicant_commentfield!The config file location:
config/sync/core.entity_form_display.o_app.contractor.contractor_sc__referred.ymlConfig file content:
And here is the French translation of this Form Mode.
Location:
config/sync/language/fr/core.entity_form_display.o_app.contractor.contractor_sc__referred.ymlContent:
Comment #3
drupalfan2 commentedThank you, but my solution is very easy:
But still this module needs a solution for its own.
Comment #4
nikita_ttI think this is a more general problem related to the translation of third-party settings. And I suggest using config files for translating field labels and their rewrites instead of doing it via code.
Comment #5
drupalfan2 commentedYes we need a solution appropriate to this module.
Comment #6
promo-il commentedentity_form_field_label.module
then reload form or display for not-default language
then add translation\s on /admin/config/regional/translate
Comment #7
dinazaur commentedActually, configuration just requires a schema to be translatable, in this patch was already added schema for widget. Also, dev version of the module already has a schema for formater. That's all you need to be able to translate the labels.
Comment #8
nikita_ttFixed here: https://www.drupal.org/project/entity_form_field_label/issues/3280148
The 8.x-1.6 release contains these changes.