PR-6.3-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
4 Nov 2026

Pull Request resolves # .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

TL:DR we don't need special code to ensure ( ) are not displayed as ) ( when we mix LTR and RTL text in the same string as seen when we have a language selection - we did need this 10_ years ago but no more

Summary

AI rewrite - to try and make my rambling explanation first draft understandable
This PR removes the use of the Unicode Left-to-Right Mark (‎, U+200E) where it was previously added to correct the display of parentheses in RTL languages.

The workaround was originally introduced to address problems with the rendering of paired parentheses in bidirectional text. However, this behaviour is now handled automatically by modern implementations of the Unicode Bidirectional Algorithm (UBA).

The additional directional marks are therefore no longer necessary for this purpose and can be removed.

Why is this change necessary?

Historically, browsers did not always correctly handle paired parentheses when displaying mixed-direction text.

For example, consider an Arabic label containing an English word in parentheses:

اسم الحقل المخصص (text)

The Arabic text reads from right to left, while the English word reads from left to right. Older implementations of the bidirectional algorithm could display the parentheses incorrectly.

اسم الحقل المخصص )text(

Joomla previously worked around this problem by appending an invisible Left-to-Right Mark (‎) to the affected strings.

However, this is no longer necessary with modern browser implementations.

The Unicode Consortium introduced improvements to the Unicode Bidirectional Algorithm in Unicode 6.3 (September 2013). These included paired bracket detection and resolution, allowing browsers to correctly handle matching parentheses and brackets in bidirectional text.

The W3C Internationalization Working Group explicitly documents this improvement in its article:

[Inline markup and bidirectional text in HTML – W3C](https://www.w3.org/International/articles/inline-bidi-markup/)

Under the section Mirrored characters, the W3C explains that up-to-date implementations of the bidirectional algorithm automatically balance parentheses. No additional directional characters or other intervention are required.

The W3C also provides a browser test suite covering this behaviour:

[W3C – Bidirectional algorithm browser tests](https://www.w3.org/International/i18n-tests/results/bidi-algorithm)

These tests specifically cover paired parentheses, square brackets and curly brackets in RTL contexts.

The underlying Unicode specification is also documented here:

[Unicode Standard Annex #9 – Unicode Bidirectional Algorithm](https://www.unicode.org/reports/tr9/)

Since this behaviour is now handled by modern browsers, continuing to insert invisible directional marks for this particular purpose is an unnecessary workaround.

This PR removes those obsolete additions without changing the underlying text, markup or intended presentation.

Expected impact

There should be no visible change to Joomla's interface.

The removal simply allows the browser's native bidirectional algorithm to handle paired parentheses, rather than relying on additional invisible directional characters inserted by Joomla.

No changes to translations or language packs are required.

This change does not attempt to remove directional marks used for other purposes, such as isolating mixed-direction text, numbers or other content where explicit directional control is still necessary and I will review the methods used for those in a later PR

Testing instructions

Important: There should be NO visual change as a result of this PR.

The purpose of testing is to confirm that the existing presentation remains exactly the same after removing the unnecessary directional marks.

Testing should be performed using a genuine RTL language such as Arabic or Hebrew. Simply changing the RTL setting of an English language pack is not sufficient to reproduce the same bidirectional text behaviour.

  1. Install an RTL language pack, such as Arabic, and set it as the administrator language.
  2. Navigate to the affected areas of the Joomla where the removed directional marks were previously used - see screenshots at the end
  • com_languages
  • admin login language selction dropdown
  • Joomla installation language selector
  1. Pay particular attention to labels containing parentheses around English text.
  2. Verify that opening and closing parentheses are displayed correctly and that the labels look exactly as they did before this change.

The W3C browser tests linked above can also be used to independently verify the browser's handling of paired parentheses in an RTL context.

Expected result: All affected labels and interface elements should look identical before and after this change. There should be no reversed parentheses, unexpected character ordering or other visual differences.

Screenshots

image image image image

References

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar brianteeman brianteeman - open - 4 Nov 2026
avatar brianteeman brianteeman - change - 4 Nov 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Nov 2026
Category ⇒ Administration com_fields com_languages Modules Installation
avatar brianteeman
brianteeman - comment - 4 Nov 2026

Bonus - another phpstan exception bites the dust

avatar brianteeman brianteeman - change - 4 Nov 2026
Labels Added: PR-6.3-dev
avatar exlemor exlemor - test_item - 4 Nov 2026 - Tested successfully
avatar exlemor
exlemor - comment - 4 Nov 2026

I have tested this item ✅ successfully on 3e97606

I have tested this PR fix. Thank you @brianteeman!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48770.

avatar exlemor
exlemor - comment - 4 Nov 2026

I have tested this item ✅ successfully on 3e97606

I have tested this PR fix. Thank you @brianteeman!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48770.

avatar mortezahonar mortezahonar - test_item - 9 Nov 2026 - Tested successfully
avatar mortezahonar
mortezahonar - comment - 9 Nov 2026

I have tested this item ✅ successfully on 3e97606


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48770.

avatar mortezahonar
mortezahonar - comment - 9 Nov 2026

I have tested this item ✅ successfully on 3e97606


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48770.

avatar mortezahonar
mortezahonar - comment - 9 Nov 2026

I have tested this item ✅ successfully on 3e97606


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48770.

With the rise of AI, the issue of RTL in its chat box is an important and problem-filled matter.

It was informative.

avatar richard67 richard67 - change - 10 Nov 2026
The description was changed
Status Pending ⇒ Ready to Commit
avatar richard67
richard67 - comment - 10 Nov 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48770.

Add a Comment

Login with GitHub to post a comment