2

Opinions seem to differ on what numeral system to use when localising software to Hindi:

Java

hi: Western Arabic

Locale hi = new Locale("hi")
System.out.format(hi, "%d", 123456)
-> 123456

hi_IN: Devanagari

Locale hi_IN = new Locale("hi", "IN")
System.out.format(hi_IN, "%d", 123456)
-> १२३४५६

JavaScript - nodejs

hi: Western Arabic

console.log(new Intl.NumberFormat('hi').format(123456.7890));
-> 1,23,456.789

hi-in: Western Arabic

console.log(new Intl.NumberFormat('hi-IN').format(123456.7890));
-> 1,23,456.789

JavaScript - Firefox

hi: Western Arabic

console.log(new Intl.NumberFormat('hi').format(123456.7890));
-> 1,23,456.789

hi-in: Western Arabic

console.log(new Intl.NumberFormat('hi-IN').format(123456.7890));
-> 1,23,456.789

moment.js

hi: Devanagari

https://github.com/moment/moment/blob/develop/locale/hi.js#L13-L36

So...

Which is correct? Or is there no definitive answer?

Armand
  • 23,463
  • 20
  • 90
  • 119

0 Answers0