DO NOT MERGE: Support non-latin formats
For some reason this breaks on the JVM, even though its not reproducible on the console:
eric@Erics-MacBook-Pro:~/Work/scala-java-locales$ sbt console
[info] Loading project definition from /Users/eric/Work/scala-java-locales/project
[info] Set current project to scala-java-locales (in build file:/Users/eric/Work/scala-java-locales/)
[info] Starting scala interpreter...
[info]
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.
scala> import java.util.Locale
import java.util.Locale
scala> import java.text.NumberFormat
import java.text.NumberFormat
scala> val locale = Locale.forLanguageTag("hi-IN")
locale: java.util.Locale = hi_IN
scala> val decimalFormat = NumberFormat.getInstance(locale)
decimalFormat: java.text.NumberFormat = java.text.DecimalFormat@674dc
scala> decimalFormat.format(1234567890.123)
res0: String = १,२३४,५६७,८९०.१२३
@er1c this is reproducible with export JAVA_OPTS="-Djava.locale.providers=CLDR"
@er1c you can use java.util.Locale.getAvailableLocales.foreach { l => println(s"${l} - ${java.text.NumberFormat.getInstance(l).format(123456789.01)}") } to get a list if you have that export up
@er1c I tested this locally and I reproduce that it works on JVM but not on JS, any plans about getting this to work?
@cquiroz there is a reason it says do not merge :) we need to fix the getZeroDigit to pull from the CLDR, then I think this should work
Ok, no pressure, just checking in 😄