KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to localize numbers in String.format call the same way as NumberFormat.format does? I've expected it simply to use String.format(locale, "%d", number) but this doesn't return the same result as NumberFormat . For example: String.format(Locale.GERMAN, "%d", 1234567890) gives: "1234567890", while NumberFormat.getNumberInstance(Locale.GERMAN).format(1234567890) gives: "1.234.567.890" If it can't be done, what's recommended way for localizing text including numbers?
Tags (comma-separated)
Save Edits
Cancel