if t() string has fallback language in another text direction, bidi should be added

Created on 10 September 2014, over 10 years ago
Updated 1 September 2024, 4 months ago

Problem/Motivation

If there is no translation for a text string Drupal displays the text string in afallback language. For some languages a text direction change can occur. For wcag and correct display, a bidi character or html tag should be used.

Proposed resolution

As we don't know if HTML is generated, we can't output html, so we should output unicode bidi characters. The visual order in which text is displayed can sometimes be modified using two invisible Unicode control characters: LRM (U+200E LEFT-TO-RIGHT MARK) which can be added to the source text using the character itself or the escapes ‎ or ‎, and RLM (U+200F RIGHT-TO-LEFT MARK), for which the escapes are ‏ or ‏).

Remaining tasks

  • test if the bidi characters don't break email, rss, etc
  • check if we should filter the unicode characters in certain text functions

User interface changes

Correct text direction in rtl languages like Arabic.

API changes

We will get extra invisible unicode characters in many places. From email to RSS. Some text functions might need adjustments.

Sources

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
LocaleΒ  β†’

Last updated about 5 hours ago

Created by

πŸ‡³πŸ‡±Netherlands Hanno

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    There has been no work on this issue for 10 years. Is this still relevant?

    Let's get confirmation that this still exists. Can someone provide steps to reproduce?

    Since we need more information to move forward with this issue, I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Closed: outdated 4 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    5 months has passed and there is no confirmation that this problem still exists. There for closing.

    f you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue β†’ (starting from "Install Drupal core").

    Thanks!

Production build 0.71.5 2024