how to display grand total in arabic words

Try it.

{{ frappe.utils.money_in_words(doc.grand_total, "AED")}}