• 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
Localizable strings & attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localizable strings & attributes


  • Subject: Localizable strings & attributes
  • From: Luc Heinrich <email@hidden>
  • Date: Sun, 12 Aug 2001 23:04:19 +0200

Hi,

I have a bunch of localizable strings which will eventually be displayed in an NSTextView. What would be the best way to add attribute informations to them ?

I tried some stuff using RTF tags, like...

/* Some dummy french translations */
"Here is some bold text: %@" = "{Voici du texte en gras: \\b %@ \\b}";
"Here is some italic text: %@" = "{Voici du texte en italique: \\i %@ \\i}";

If I create some NSAttributedStrings (initWithRTF) using these entries and append them to the NSTextStorage, it won't work. If I add some font tags, like...

/* Some dummy french translations */
"Here is some bold text: %@" = "{Voici du texte en gras: \\f1\\b %@ \\b\\f0}";
"Here is some italic text: %@" = "{Voici du texte en italique: \\f1\\i %@ \\i\\f0}";

...it seems to work quite well, except that the font displayed is not the one I've chosen for the text view in IB.

Is there another (and/or better) way to do this ? Thanks.

--
Luc - email@hidden


  • Prev by Date: Re: Tracking animation in multiple windows using NSTimer vs NSThread?
  • Next by Date: Re: AppleScript and error messages
  • Previous by thread: Re: Multiple instances
  • Next by thread: Some help would be greatly appreciated
  • Index(es):
    • Date
    • Thread