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.
Comments
Comment #1
hanno commentedComment #2
hanno commentedComment #3
hanno commentedComment #4
hanno commentedComment #5
hanno commentedComment #6
mgiffordThanks for this great summary. This is definitely a good addition.
Comment #7
hanno commentedAdded Amsterdam2014 as prelude towards #1165476: if t() string has no translation or fallback language, text should have lang attribute
Comment #8
yesct commentedComment #9
mgiffordThis might be too late for 8.0. @YesCT best to bump it to 8.1?
Comment #23
quietone commentedThere 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!
Comment #24
quietone commented5 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!