Using Webforms, create an Entity Select (or Entity Autocomplete) and assign it's source to a Entity Reference View (instead of default) created from a taxonomy.

If it the taxonomy has translation(s), you can not get them to show the translated Entity Name. It always shows English name, even when you put in a filter in the Entity Source View for a specific langcode.

The Entity Reference Source View results are translated so it must be an issue with the Webform.

Comments

ahmadux created an issue. See original summary.

jrockowitz’s picture

Status: Active » Fixed
StatusFileSize
new107.53 KB

I was able to replicate the issue and then realized that my entity reference view was not configured to use the 'Interface text language selected for page' as the 'Rendering Language'

I think this will completely solve your issue.

BTW, please be aware of this core issue #2737619: Views entity reference relationships must join on langcode for translatable entities.

jrockowitz’s picture

ahmadux’s picture

StatusFileSize
new13.1 KB
new45.05 KB
new82.86 KB

I couldn't get the Entity Reference Translation to work for me.

Including three screen shots of my settings. They show that the translation exists, that the Entity Reference View is marked to provide Translation based on Interface language and that the Webform entity is indeed pointing to the Entity reference View.

Appreciate any help I can get.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

abaier’s picture

I go the same problem, while using an entity select field to feed an embedded view with its values.

The options do not show up with their translation, instead the original title will be set. I attached some screenshots which show, that the views preview shows the correct value of the first, translated article, which does not reflect the output within the webform. The embedded view also prints the correct values.

Another problem is, that the options empty value will not be translated either, which seems to affect all select fields inside my webforms. Sorry, could translate that inside webforms global settings.

Any ideas? Thanks in advance.

abaier’s picture

mhentry’s picture

Hi, I am trying to use entity select element in webform with referencing entity view, since my dropdown list is very long, the site hangs for a bit to load the list into entity select. Is there is a way to limit the entity list to load certain number in the dropdown ?

jrockowitz’s picture

The Webform module's issue queue is for bugs, feature requests, and planning. Please post general support questions to Drupal Answers. You can also ask questions or help answer questions on the #webform channel on Drupal Slack.