Translate Amount to word

Hi all, I use function <script>doc.in_words_export</script> in format print to display amount in word, but it display english language. I live in Vietnam and I want to it display vietnamese language. Can you help me. Thank all.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
I guess you will have to edit this function

https://github.com/webnotes/wnframework/blob/master/webnotes/utils/__init__.py#L472

Or make it language friendly!

On Wednesday, October 23, 2013 9:08:52 AM UTC+5:30, th...@saigontechnology.vn wrote:
Hi all, I use function <script>doc.in_words_export</script> in format print to display amount in word, but it display english language. I live in Vietnam and I want to it display vietnamese language. Can you help me. Thank all.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Thank rushabh!
I created a function convert number to word by javascript language and it work very good.

Vào 10:38:52 UTC+7 Thứ tư, ngày 23 tháng mười năm 2013, th...@saigontechnology.vn đã viết:
Hi all, I use function <script>doc.in_words_export</script> in format print to display amount in word, but it display english language. I live in Vietnam and I want to it display vietnamese language. Can you help me. Thank all.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Can you share your function? Some others might also find it useful.

On Wednesday, October 23, 2013 11:44:34 AM UTC+5:30, th...@saigontechnology.vn wrote:
Thank rushabh!
I created a function convert number to word by javascript language and it work very good.

Vào 10:38:52 UTC+7 Thứ tư, ngày 23 tháng mười năm 2013, th...@saigontechnology.vn đã viết:
Hi all, I use function <script>doc.in_words_export</script> in format print to display amount in word, but it display english language. I live in Vietnam and I want to it display vietnamese language. Can you help me. Thank all.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
This 's my form print format.
https://gist.github.com/lxthien/7ba5945c907b92bc71d8
From line 201 to 233 have function to translate number to word. (In file have some word vietnamese language) 

Vào 10:38:52 UTC+7 Thứ tư, ngày 23 tháng mười năm 2013, th...@saigontechnology.vn đã viết:
Hi all, I use function <script>doc.in_words_export</script> in format print to display amount in word, but it display english language. I live in Vietnam and I want to it display vietnamese language. Can you help me. Thank all.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
1 Like

Hi,
Can anybody tell me how to edit this function to change language ? Because I am new in ERPnext and I do not know where I can edit function.

Thanks

I could’t code so cant translate Amount to word function from English to Turkish,
but I turn off the “in words” setting in Global Defaults:
Home > Settings > Settings > ERPNext Settings (Global Defaults)
Best Regards

Hello @ozkan,
You may try to increment num2words’ version number in apps/frappe/requirements.txt.
It should be num2words==0.5.5 and Turkish language was added in 0.5.6. (num2words/CHANGES.rst at master · savoirfairelinux/num2words · GitHub)
Then you should do bench update
Regards.

Hello @ozkan, my PR is merged. fix: Update num2words for Turkish translation support by TurkerTunali · Pull Request #10555 · frappe/frappe · GitHub
But we still need to tweak some files a little bit. I can send you a fix if you want.

1 Like

Is there an update for this?