Re: Is Concatenation that complex?
Re: Is Concatenation that complex?
- Subject: Re: Is Concatenation that complex?
- From: Glenn Andreas <email@hidden>
- Date: Tue, 27 Apr 2004 16:46:59 -0500
At 3:40 PM -0500 4/27/04, Michael Grant wrote:
>
On Apr 27, 2004, at 2:44 PM, Bob Ippolito wrote:
>
>
>For joining a lot of strings together without operator support it
>
>probably makes sense to use a format or to use an array join rather
>
>than doing lots of 2-string concatenation.
>
>
Best to avoid string concatenation altogether if you ever plan to
>
localize to other languages.
>
Michael
You could localize the format string itself (independant of the
components), and one of the possible formats indicates what order to
substitute the parameters.
From
http://developer.apple.com/documentation/Cocoa/Conceptual/Internationalization/Tasks/NotesForLocalizers.html#//apple_ref/doc/uid/20000044-113626
:
>
>
If a string contains multiple variable arguments, you can change the
>
order of the arguments by using the "$" modifier plus the argument
>
number
>
/* Message in alert panel when something fails */
>
>
"Oh %@! %@ failed!" = "%2$@ blah blah, %1$@ oh!";
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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.