Open pamprn09 opened 4 months ago
@pamprn09 @kadamwhite @goldenapples Looking at the issue, what I was thinking is that we could register a string on Polylang for the date format, allowing localisation of it. It seems more bug proof and doesn't generalise the date display by ltr or rtl, which is not exactly what dictates the date format to be displayed, but what is commonly used for the locale.
Stack Overflow solution reference: https://stackoverflow.com/a/50718299
Allowing the date format to be localized is good practice for internationalization, but I don't think that's the issue this ticket is covering. The issue is that even if the format is correct in the markup, like "15 March 2024", it will be displayed out of order visually it's in an element with a dir of "rtl", like this: (I've manually added the dir attribute, it's not in the actual site)
I'm actually not sure if this is still a bug - I haven't found a page on the diff blog which is broken, so I'm not sure if we've somehow fixed this, or if new browsers have just gotten smarter about recognizing the correct directionality of text.
@ckoerner Sounds like we've got some ambiguity about this ticket, if you have time to confirm whether it's still an issue.
The <span>
has direction set to ltr
on CSS, to ensure the order of date + posted by %author%
, so I don't think we want to change it. If what we want is to change the order in which date parts are displayed, the internationalization would do the job.
It looks like something has been fixed along the way. Here's a screenshot from 2022 (from the humanmade/Wikimedia repo issue)
So the original issue is resolved.
That said, to be correctly formatted RTL, the byline should be like this:
I've Added specific date format for the rtl languages.