On 4 Jan 2009, at 00:02, Chunk 1978 wrote:
is this possible? i have a string that changes color and size according to the length of the words in the string. however, these words and their lengths change in different languages. clearly i could add and NSLocalization wrapper to the string, but the problem is that the attributes would remain the same.
One way is to store your string's contents in an RTF file that you include as a resource in your application, then load its contents using -[NSAttributedString initWithPath:documentAttributes:] (or similar). You can use -[NSBundle pathForResource:ofType:] to find the path for the correct localized variant.
There are many variations on the above, but hopefully that should get you on the right track.
Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com