Skip to content

Instantly share code, notes, and snippets.

@alexanderfefelov
Created March 1, 2015 05:56
Show Gist options
  • Save alexanderfefelov/79187163955729ce0d48 to your computer and use it in GitHub Desktop.
Save alexanderfefelov/79187163955729ce0d48 to your computer and use it in GitHub Desktop.
42 на всех (почти на всех) языках
import java.text.DateFormat
import com.ibm.icu.text.RuleBasedNumberFormat
object ICU42 extends App {
val locales = DateFormat.getAvailableLocales.toList
locales.filter(_.toString.length > 0).sortBy(_.toString).map( locale =>
System.out.println(s"$locale ${new RuleBasedNumberFormat(locale, RuleBasedNumberFormat.SPELLOUT).format(42)}")
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment