This can be done, but nothing can replace the actual, conscientious translation of content made by a professional, or you yourself if you are fluent in both languages.
What you can do as a workaround is to: dynamically add the "dir = rtl" attribute to your html tag (or some tag containing the text you want to translate), and then redirect it somehow to the translated version of Google this page. But I personally would not advise doing this. The Google translation is just awful and you donβt want your content to put off your users or even offend them even worse if the translation misfires ...
source share