Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use variable in localization strings

Is it possible to "preprocess" localization strings to substitute SOME_CONST with its predefined value?

For example, can I put some placeholder into my storyboards and localized strings and replace it on build time?

Its not about localizing but about preprocessing localization files or other resources with preprocessor`s constants.

like image 787
Alexey Sidorov Avatar asked Jun 12 '26 12:06

Alexey Sidorov


1 Answers

Yes, you can do that

You may have a shell script phase that preprocesses the files before xcode uses them.


and no, I don't think there is a built in way

like image 135
Daij-Djan Avatar answered Jun 14 '26 03:06

Daij-Djan