Problem/Motivation
Under certain circumstances, paths in path fields display in an unexpected order when using RTL languages or mixing RTL characters with Latin characters in the same path. See #2336569-34: Remove incomplete <span> usage from #field_prefix and #field_suffix and below for a full explanation.
Steps to reproduce
Enter paths using mixed languages, for example part1/חלק2/part3/חלק4 and try rearranging the path order. See the screenshots below.
Proposed resolution
Determine if this behavior is expected and desired or not, and correct it if not. From the linked issue:
Regarding the URLs, I would like to compare it with the Path alias field on node form page, since the path alias field already shows in RTL.
I didn't
In the view path field I noticed that it shows fine in these cases (screenshot attached):
- One Arabic part.
- Mixed parts (Arabic & English parts) It should not have two Arabic parts beside eachother.And it shows in wrong order in these cases:
- Two or more Arabic parts beside each other.
- Mixed parts having two Arabic parts or more beside each other.That's mean the user now should separate the Arabic URL parts with English to not notice this issue.
The approach in the (Path alias field in node form and the site front page field in site basic information settings) is working fine if we are writing same RTL language words in the path in RTL path field. (Path alias screenshots attached).So, I in my humble opinion, I think this is a browser issue since the same behavior show in the browser address bar. And it depends if we are writing the all path parts in the same RTL language, then making the path field RTL is make sense. But if we use the English language for our page paths and might use only one part in the same RTL language, then making the path field LTR will be ideal.
Also, I think we might consider these points:
- Currently, the default Drupal internal paths is in English regardless what is the main site language.
- The path fields mostly not will be used by the site visitors or regular users.
- Path alias field in node form might be allowed for editor users. So, it might be fine for it to show in RTL like the current state. But in the view path field, I think it mostly will be used by the site admin only. And I think probably it might not have more than one part in the same RTL language.I attached a screenshots here I hope it will explain the compare between when the field is in RTL and in LTR.
Note: Green text in screenshots means the path parts order is correct. Red means path parts order is wrong.
Note: I didn't applied any patch, just want to share my thoughts.


Remaining tasks
See above
User interface changes
TBD
API changes
n/a
Data model changes
n/a
Release notes snippet
TBD
Comments
Comment #2
katherined