Localizable strings & attributes
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