Emil
Emil

Reputation: 7256

NSDateFormatter - set device language as locale?

I'm trying to get the iPhone to display dates formatted by an NSDateFormatter in the current device language.

I have tried setLocale:[NSLocale currentLocale], but that only returns 5 instead of May (or Mai, as I want it to be).

EDIT: currentLocale shows May (english). systemLocale shows 5 (I think systemLocale is Norwegian), and autoupdatingCurrentLocale shows May as well.

Any help is appreciated. Thanks! :)

NEVERMIND - The simulator played a trick with me, it works on a real device. #

Upvotes: 1

Views: 2654

Answers (1)

Emil
Emil

Reputation: 7256

I had forgotten to set the Region Format to my local region format :)

Upvotes: 4

Related Questions