Writing Direction for Multi-Language Texts

thank you for this post. I had some problems regarding that using this post, I changed my prodigy config to "rtl" and now, it is working well, however, as you see for the text is mixed Persian and English. I have a problem

as you see in the sents with Persian and English words, the order is wrong, any idea how can I solve it?