Converting NSCalendarDate to NSString with local language
Converting NSCalendarDate to NSString with local language
- Subject: Converting NSCalendarDate to NSString with local language
- From: Lorenzo Puleo <email@hidden>
- Date: Wed, 20 Mar 2002 14:36:23 +0100
I have a question about converting a NSCalendarDate to a NSString in the
main language set in the "System Preference:International:Language" panel.
For example, if you set Fracais, you would expect the name of the day is
"Mercredi" instead of "Wednesday".
I went to the "System Preferences:International:Language" panel and choosed
"Francais" as main language.
I went to the "System Preferences:International:Date" panel and choosed
"French" as Region. I did the same for "Time" and "Numbers" panels, just to
be sure.
I rebooted my computer, so the Finder menu appeared in Francais language.
The current date shown at the top-right of the menu bar shows the date in
Francais language too (mercredi 20/3/2002). Fine.
Now I launch my Cocoa application. The French NIB file is loaded properly, I
can see my dialog windows and labels in Francais language.
Then I try to display the current date as a Francais NSString
NSString *today = [[NSCalendarDate calendarDate]
descriptionWithCalendarFormat: @"%A %d %B %Y"];
NSRunAlertPanel(@"Jour:", today , @"OK", nil, nil);
But it is still shown as english: "Wednesday 20 March 2002"
I also used:
[[NSCalendarDate calendarDate] descriptionWithCalendarFormat:@"%A %d %b %Y,
%H:%M" timeZone:nil locale:nil];
but the result is the same: english.
What do I wrong?
Is anybody can give me a suggestion?
--
Lorenzo
mailto:email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.