The macros iOS has for creating localized strings are pretty awesome when used with genstrings
. However, I'd like to create my own #define on top of one of the macros like so:
#define MyLocalizedStringWithDefaultValue(key, tbl, val, comment) \
NSLocalizedStringWithDefaultValue(key, tbl, [NSBundle mainBundle], val, comment)
#endif
Essentially, I always want to be going against the main bundle, so I don't feel the need to type it out every time. This works great in code, but genstrings
doesn't pick up my macro. Is there anything I can do to make it pick up my custom macro? I saw on the man page that there's a routine parameter that looks like what I'm trying to do, but I was unable to get it to work.
genstrings *.m -s MyLocalizedStringWithDefaultValue
but it's not picking up the macro – Tristantristas