• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Localized alert function?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localized alert function?


  • Subject: Localized alert function?
  • From: Darrin Cardani <email@hidden>
  • Date: Tue, 25 Nov 2003 11:05:52 -0600

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 (). It just seems like more work than it should be. (I guess I got spoiled by ParamText ().) :-) Is there a way to define an alert in a resource that can be localized, rather than just defining strings?

Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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.

  • Follow-Ups:
    • Re: Localized alert function?
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: Java3D in cocoa
  • Next by Date: New build phase...
  • Previous by thread: Re: Communication between an NSView and AppController;
  • Next by thread: Re: Localized alert function?
  • Index(es):
    • Date
    • Thread