marmelroy / Localize-Swift

Swift friendly localization and i18n with in-app language switching
MIT License
3.07k stars 330 forks source link

String interpolation example. #89

Open electic opened 7 years ago

electic commented 7 years ago

First off, great pod. Is there a string interpolation example that one might point me to? It doesn't seem to work when you just tack on localize() at the end of an interpolated string.

electic commented 7 years ago

Figured it out. You have to do this:

String(format: " • Range: %@ - %@".localized(), formattedLowPrice!, formattedHighPrice!)

If you interpolate variables, it will not work. I am not sure if this was intended but correct me if I am wrong.

itaispector commented 5 years ago

@electic Thanks for mentioning, I suggest you add it the readme file.