Fix number formatting for Arabic and other languages

This commit is contained in:
2023-02-26 08:21:33 +13:00
parent f840fe9c80
commit 16156f4d9a
5 changed files with 11 additions and 18 deletions

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)"
}