<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">I am not talking to eliminate "%" style function. I am talking to add more compatibility to `NSLocalizedString` with `\(foo)` style. As there is no rule forbidding that, it should work. If someone doesn't need the flexible parts, why he has to use the complicated way?</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 2, 2016 at 1:49 PM, Jens Alfke <span dir="ltr"><<a href="mailto:jens@mooseyard.com" target="_blank">jens@mooseyard.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Nov 1, 2016, at 10:40 PM, Zhao Xin <<a href="mailto:owenzx@gmail.com">owenzx@gmail.com</a>> wrote:<br>
><br>
> For example, if I want show the user that I have to ask him to give me permission of a folder, the `url.path` has no need to translate.<br>
<br>
</span>We’re getting off-topic, but paths do need to be translated, at least on Mac systems. The names of many standard folders like “Applications” and “Documents” are hardwired to English in the filesystem but are localized in the UI. Some application names get localized too (there’s a table in the app’s Info.plist that can substitute localized names.)<br>
<br>
Anyway, string interpolation is convenient, but I wouldn’t say it should be the only way to format strings in Swift; it’s a lot less flexible than the C-style “%” substitutions. For comparison, even though C++’s iostreams use “<<“ to format strings by concatenation, I still end up using “%” based formatting a lot, depending on the use case.<br>
<span class="HOEnZb"><font color="#888888"><br>
—Jens</font></span></blockquote></div><br></div>