Twitter widget always renders in English when no language specified.

Created on 1 October 2023, 9 months ago

Problem/Motivation

On a multi-language site, if you embed a twitter block on a page (in my case via layout builder) you will always see the English version of widget regardless of the user language context as negotiated by Drupal.

Steps to reproduce

1. Set up a site with two languages (e.g. English and Greek)
2. Embed the twitter block on a page with default settings for language (empty).
3. The widget shows in English when content language has switched to Greek.

Proposed resolution

I'm not sure if this a problem in the way that core renders link render arrays or if this need to be solved in this module.
Perhaps core should always be adding a link attribute to links by default? Anyway, my fix here is just to add the lang attribute from the current language unless specified by the user in the block config.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia thtas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024