<p>When a script is saved as a bundle, it can use the <code>localized string</code> command to find the appropriate string, e.g. in <code>Contents/Resources/English.lproj/Localizable.strings</code>. If this is a format string, what is the best way to fill in the placeholders? In other words, what is the AppleScript equivalent of <code>+[NSString stringWithFormat:]</code>?</p>

<p>One idea I had was to use <code>do shell script</code> with <code>printf(1)</code>. Is there a better way?</p>

As ugly as it is, calling out to
```
printf(1)
```
is the common solution.
A cleaner, though somewhat more complex, solution is to use AppleScript Studio, which allows you to call into Objective-C objects/classes from your AppleScript code with the
```
call method
```
syntax documented
here
.
With that, you'd be able to use something like this:
```
```
call method "stringWithFormat:" of class "NSString" with parameters {formatString, arguments}
```
```
The downside of this, of course, is that you need to write an AppleScript Studio app instead of just writing a simple script. You do get a good bit more flexibility in general with Studio apps, though, so it's not all together a terrible route to go.