Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
Post marked as unsolved with 6 replies, 0 views
Replied In
Format integers in Localizable.stringsdict
The localized format string methods will format numbers for you.
String.localizedStringWithFormat(NSLocalizedString("RecordsFound", comment: ""), 15387)
Will return "15,387 records found"
Alternatively, especially if you need to specify a different Locale
String(format: NSLocalizedString("RecordsFound", comment: ""), locale: Locale.current, arguments: [15387])
Will also return "15,387 records found"
This doesn't have the full freedom of allowing you to pass any string in, but it does keep the stringsdict file the same and doesn't restrict translations.