Re: Localized alert function?
Re: Localized alert function?
- Subject: Re: Localized alert function?
- From: Stéphane Sudre <email@hidden>
- Date: Tue, 25 Nov 2003 19:33:57 +0100
On Tuesday, November 25, 2003, at 06:39 PM, Darrin Cardani wrote:
At 11:05 AM -0600 11/25/03, Darrin Cardani wrote:
I'm looking at NSRunAlertPanel (). It takes several NSString*
arguments. I could call:
NSRunAlertPanel (NSLocalizedString (title, comment),
NSLocalizedString (message, comment),
etc.,
in order to get localized strings, but that seems quite cumbersome.
Is that the way it's usually done, or is there some better method?
The above method starts getting even more messy if you want to do any
sort of insertion of words into the error message. You have to get
the localized version, then do the insertion, then pass that result
to NSRunAlertPanel ().
Actually, I see that NSRunAlertPanel () actually takes printf ()-style
arguments. That makes things a little easier. But I'm still curious if
there's any other way to do this, other than getting a bunch of
localized strings and passing those to a function.
I don't see the issue, what prevents you from doing this?
NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"I used
to find ^1 was clever but since I discovered %@, it changed my life.",
@"Description forthcoming"),@"ResEdit is prehistoric"],etc...
_______________________________________________
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.