Localize a float and specify number of decimal places in iOS
问题 I have a float that I'd like to display to one decimal place. E.g. 104.8135674... to be displayed as 104.8 in English. Usually I'd use: myString = [NSString stringWithFormat:@"%.1f",myFloat]; However, I'd like to localize the number, so I tried: myString = [NSString localizedStringWithFormat:@"%.1f",myFloat]; This works to assign the correct decimal symbol (e.g. English: 104.8 German: 104,8 However, for languages that use don't use arabic numerals (0123456789), the correct decimal symbol is