So far you have only localized strings in the CarValet app. Numbers and dates also vary in formatting from locale to locale. In iOS, the language and locale are set separately, as you saw in Figure 5-1. One simple example is a device using English for the language and Canada for formats.
As mentioned previously, German numbers reverse the period and comma separators. The number 1,234.56 in English is 1.234,56 in German. At the moment, you are showing the fuel amount using
stringWithFormat: and reading it with
floatValue. Neither of these methods works with localized numbers. For that, you need
NSNumberFormatter, a class for both creating and parsing localized numbers as well as other formatting tasks. Creating a ...