Fix number formatting for Arabic and other languages

This commit is contained in:
tyiu committed 2023-02-27 10:27:13 +13:00
1 parent f840fe9c80
commit 16156f4d9a
5 files changed
+11 -18

No files matched your search

-6
View File
@@ -11,9 +11,3 @@ func bundleForLocale(locale: Locale) -> Bundle {
let path = Bundle.main.path(forResource: locale.identifier, ofType: "lproj")
return path != nil ? (Bundle(path: path!) ?? Bundle.main) : Bundle.main
}
func formatInt(_ int: Int) -> String {
let numberFormatter = NumberFormatter()
numberFormatter.numberStyle = .decimal
return numberFormatter.string(from: NSNumber(integerLiteral: int)) ?? "\(int)"
}