Languages and RTL
English and Arabic built in, your own languages, and right-to-left content.
On this page
English and Arabic are built in. The UI mirrors itself in RTL languages, and every block in the content picks its own direction.
Arabic and RTL
Set language for the interface and dir for the base direction of the content. Without dir, each text block gets dir="auto", so Arabic and English paragraphs each display correctly in the same document. Word and character counts segment words correctly in Arabic and CJK.
Add your own language
Pass languages to add or replace UI languages. Untranslated labels fall back to English. Override a few strings of an existing language with labels. The Arabic labels are exported as arabicLabels, a good starting point for another RTL language.
Displaying RTL content
When you show saved HTML, keep the dir attributes the editor wrote and wrap it in owe-content-root. Set lang on the container for content in another language so screen readers use the right voice.