To-words: Need Support for localeCode

Created on 19 Jun 2020  ·  15Comments  ·  Source: mastermunj/to-words

Currently only en-IN & en-US are supported.
We need to use and support more locale Code.

All 15 comments

Which other locale do you need support for?

I need to use for Australian Dollar => en-AU and Mauritian rupee => en-MU.

is there any difference in output between en-US <> en-AU and en-MU <> en-IN?

Can you point me towards how both currencies write numbers to words?

For Example:
20240.45
MUR => (en-MU) "Twenty Thousand Two Hundred Forty Rupees And Forty Five Cents Only"
INR => (en-INR) "Twenty Thousand Two Hundred Forty Rupees And Forty Five Paise Only"
USD => (en-US) "Twenty Thousand Two Hundred Forty Dollars And Forty Five Cents Only"
AUD => (en-AU) "Twenty Thousand Two Hundred Forty Dollars And Forty Five Cents Only"

USD and AUD are same, but INR and MUR are different,
So I need to use MUR as I have given above.

If my understanding is right, the difference between en-IN & en-MU are:

  • Paisa <> Cent
  • Paise <> Cents
  • Symbol ₹ <> Rs

Did I miss any other difference?

Also, I believe en-US can be used for en-AU without any issue. Correct?

Hi,
20240.45
I want to use for MUR, the expected Result as below should come:
MUR => (en-MU) "Twenty Thousand Two Hundred Forty Rupees And Forty Five Cents Only"

but If I use below one for MUR both are Different
USD => (en-US) "Twenty Thousand Two Hundred Forty Dollars And Forty Five Cents Only"

can you see all four examples where for MUR I am not getting the expected result, if I paas:
INR => (en-INR) "Twenty Thousand Two Hundred Forty Rupees And Forty Five Paise Only"
USD => (en-US) "Twenty Thousand Two Hundred Forty Dollars And Forty Five Cents Only"

but I want:
MUR => (en-MU) "Twenty Thousand Two Hundred Forty Rupees And Forty Five Cents Only"

DIFF

Thank you for confirming the changes @gyannitrr1993

I am not sure if Mauritius follows Lakhs & Crores as standard or Millions & Billions.

Would you have any reference to confirm this?

The Only Difference between INR and MUR is:
INR - Paise (for paise)
MUR - Cents (for paise)

please check here, what we called Paisa in MUR:
https://mauritiusattractions.com/mauritius-currency-i-92.html
MUR

MUR1

56 should solve this. Can you do a quick check if it really solves for you?

Sure thankyou, I will check.

Yes, It will work for MUR.🙃🙂

Released a new version 2.2.0 that solves this.

I am trying to use localeCode 'en-MU', I have updated my package 2.2.0

image

Was this page helpful?
0 / 5 - 0 ratings