Right-to-left locale not appearing as such in the In-Context Editor

We’ve just added the custom locale arb (Modern Standard Arabic) to our project (prereview) and were surprised to see the In-Context editor still appear left-to-right when selected.

We’ve mitigated this on translate.prereview.org by manually setting the dir attribute (and then using the unicode-bidi CSS property to handle untranslated strings, i.e. text that is left-to-right):

This does involve polling the value of window.jipt.target_language unfortunately. (Refs Using the In-Context target language .)

Should the In-Context editor be setting dir attributes as needed?

Also, I’ve noticed that we seem to be getting Cyrillic (Russian?) suggestions:

Is this a result of using a custom locale? (We also have one for African French (fr-002) which is correctly picking up French suggestions.)

For info, here’s the configuration of our arb locale:

Hi @thewilkybarkid

Thanks for reaching out and sharing these details!

It looks like you’ve put together a clever workaround, but the In-Context editor should ideally handle right-to-left directionality automatically. The unexpected Cyrillic suggestions are also something we’ll want to investigate closely.

Could you please write to us directly at support@crowdin.com and include a link to your project?

Hi @Iliana,

Thanks, I’ve just sent an email.