Reputation: 5338
Is it possible to localize the literal "today" in objective c/cocoa touch? That is when I display "today" a english iphone would get "today", a german would get "heute" and so forth.
Similar to the automatic handling of "monday", "tuesday" and so forth in NSDateFormatter.
Upvotes: 1
Views: 824
Reputation: 5338
The solution came from the comment by user aBitObvious.
And as aBitObvious said, it is to use the method setDoesRelativeDateFormatting:
in NSDateFormatter
. There is an example in the docs .
Upvotes: 1