Problem/Motivation
Viewing a webform via an entity reference formatter in any language which is not the interface language doesn't display the desired translation.
Steps to reproduce
- Set up language negotiation so that content and interface are separate
- Set up a webform reference field on a translatable content entity type
- Add a webform and translate it
- Add such a content entity and translate it and refer the webform
- View the translated entity
Proposed resolution
If config entities implemented TranslatableInterface
methods then EntityReferenceFormatterBase
would, as if by magic, suddenly be able to display translated config entities in the correct langcode.
As an aside, the base TranslatableInterface
is currently in the TypedData
namespace but there's no reason it should be as none of the methods take or return typed data. The entity version of it extends it but I think the base version should be somewhere else more generic. This is probably a separate issue.