In most cases the best locale to choose is "en_US_POSIX", a locale that's specifically designed to yield US English results regardless of both user and system preferences."en_US_POSIX" is also invariant in time (if the US, at some point in the future, changes the way it formats dates, "en_US" will change to reflect the new behaviour, but "en_US_POSIX" will not), and between machines ("en_US_POSIX" works the same on i OS as it does on OS X, and as it it does on other platforms).NSBundle looks at your app and tells you which of what your app provides you should use according to user settings.
For example, you can report the user's language as a string localized in that language using the autoupdating locale obtained in the previous example: property that ensures dates are converted to strings that match the user's expectations about date formatting.
By default, this property indicates the user's current locale, which is usually the behavior you want, but you can instead set it to another locale instance to obtain a different output.
The current Locale only retrieve an locale object one time from the current user's settings.
autoupdating Current Locale updates the locale object on the fly so you don't need to validate.
Once you've set "en_US_POSIX" as the locale of the date formatter, you can then set the date format string and the date formatter will behave consistently for all users.
date string, using a fixed date format string and UTC as the time zone.
You might think autoupdateing Current Locale is the prefer way, it is per Apple documentation; however, since the returned object may be cached, you don't really need to hold on to it indefinitely when using current Locale, verse autoupdateing Current Locale.
If you are using autoupdating Current Locale, note that this API do not cache the locale object, so you will need a way to compute cache upon receipt.
The distinctions and details I cover in this article were a bit confusing for me when I first started introducing internationalization in my apps, so I decided to wrap it up for myself and any curious developer.