Ideas for Arc XP

Support right-to-left justified foreign languages (Farsi, Arabic, etc)

The Post has discussed this issue with Angela Wong over the course of our Ellipsis rollout. Here is the relevant excerpt from Angela's notes from an Aug. 16 meeting:

  • Global Opinions
    • Articles are written in Farsi and Arabic. If article is fully rendered in Farsi or Arabic, then it would OK to just use language label. However what if article is in English and Farsi? I am starting to think that align left or right is not enough

 

Based on how we currently publish these foreign languages in The Post's Wordpress installation: Wordpress supports a dir="rtl" attribute on <p> tags. This only works on Ellipsis content if you use an html element that contains the text within <p dir=”rtl”> tags. This is not a feasible option given that the contents of html elements do not appear in our own apps or on google amp content. (Not to mention that it would be very difficult to edit within the html element in Ellipsis.) I think that the concern stated in Angela's above notes about an article containing both English and Farsi or Arabic is valid—the examples I see all use Interstitial links and other boilerplate text in English.

 

Farsi and Spanish are listed as options on the languages menu in the Meta panel in The Post's Sandbox and Prod environments, but Arabic and Turkish are not. I don’t expect Spanish to cause us any issues but The Post has published articles in Farsi, Arabic and Turkish. I created two stories in Sandbox and Prod and pasted Farsi text into them, and switched the language selection in the Meta tab to Farsi. In the Ellipsis admin the text is properly justified from right to left, but when I preview the stories the justification is incorrectly left to right.

 

https://washpost.arcpublishing.com/ellipsis/#!/edit/IRPQZHX2ZBD3VJYPOXYO23JHNA/

https://sandbox.washpost.arcpublishing.com/ellipsis/#!/edit/EH3E2TL2Y5D3JN4FS2ZNIFRCYE/

 

When I look in the Content API the Farsi text appears there but the dir=”rtl” attribute that we use in Wordpress to set the right-to-left justification is not appearing.

It seems like Ellipsis needs to pass the rtl dir into the Content API. If that happens, it seems possible that there’s no added work from the site team since they’re currently handling the dir on stories published from Wordpress. Here’s a recent example (in Arabic). Here is the same story in the Content API.

  • Guest
  • Dec 14 2018
  • Shipped
Categories New Functionality
  • Attach files