Is there a standard way to declare support for multiple text directionalities?

Let’s say a web page that is written in English uses logical CSS (on the inline axis) to better support RTL (right-to-left) scripts.

If the user translates the page to Arabic via Google Translate (GT), the page’s directionality (dir attribute) will not be updated to RTL. I assume GT does not want to do this because it could break the page’s layout.

However, the page uses logical CSS and does work well with dir=rtl. Is there a standard way for the page to communicate that RTL is supported and that a translation service like GT can safely set dir=rtl when translating to RTL scripts?

I was thinking something like this:

<!-- the page supports both LTR and RTL -->
<meta name="dir" content="ltr rtl">
4 Likes