Graphics Programs Reference
In-Depth Information
Build and run the application. If the currency symbol is the dollar sign in your region,
you'll need to change your region format in order to test this code. Exit the Homepwner
application and kill it in the dock. Then, in the Settings application, change Region
Format to United Kingdom ( General International Region Format ).
Run your application again. This time, you will see values displayed in pounds (£). (Note
that this is not a currency conversion from dollars to pounds; you're just replacing the
symbol.)
While your region format is set to the UK, check out the date format of the date an item
was created: it is Day Month Year . Now exit and kill Homepwner and change your region
to US. Relaunch Homepwner and navigate to an item's details. The date format is now
Month Day, Year . The text for the date label has already been internationalized. When did
this happen?
In Chapter 11 , you used an instance of NSDateFormatter to set the text of the date la-
bel of DetailViewController . NSDateFormatter has a locale property,
which is set to the device's current locale. Whenever you use an NSDateFormatter to
create a date, it checks its locale property and sets the format accordingly. So the text
of the date label has been internationalized from the start.
Search WWH ::




Custom Search