There is a way to do this that is quite simple.
There are several macros for localizing, one of which is NSLocalizedStringFromTable()
. This takes three parameters:
- The string to localize
- The table name, which is just a file name
- The comment, just like in
NSLocalizedString()
If you use a table name then you can have another strings file, i.e. if I do NSLocalizedStringFromTable(@"name", @"MyStrings", @"whatever");
then put my strings in MyStrings.strings
it will use that.
See Matt Gallagher's post about this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…