Item name want in arabic automatically when enter item name

Hi Friends,
we have “Item name”, but it should automatically translate and appear in Arabic in the new field called “Item in Arabic”

Hi @sathya_raj,

The automatic translation feature is not yet but you should create and set the Arabic word in Translation doctype.

Then apply the client script for it.

frappe.ui.form.on('Item', {
    item_name: function(frm) {
        frappe.db.get_value("Translation", {"source_text": frm.doc.item_name, "language": "ar"}, "translated_text", function(value) {
            frm.set_value("item_in_arabic", value.translated_text);
        });
    },
});

If Item Name and Translation source text match then will set the Arabic value set in the item_in_arabic field.

Output:

I hope this helps.

Thank You!

1 Like

@NCP Hi, Can you please tell me how i can achieve this in my sales invoice printing part as i need my amount in words in both english and arabic.
{{ frappe.utils.money_in_words(doc.grand_total)}} with this i got english.

Hi @jaassim,

Please check the reference → how to display grand total in arabic words - #2 by NCP