- Definition of nslocalizedstring
Look at the Macro Definition section: (Original address: http://blog.csdn.net/aries4ever/article/details/8185405)
[CPP]View Plaincopyprint?
- #define Nslocalizedstring (key, comment) \
- [[NSBundle Mainbundle] Localizedstringforkey: (key) value:@"" Table:nil]
The second parameter, Comment, can be nil, a string that is empty, or a comment to key
The first parameter, key, reads the corresponding Key-value value from the Localizable.strings file.
- Understanding localizable.strings Files
XCode4 and previous versions have changed too much, previously mentioned by many articles, such as Get info has been completely invalidated, please use this method to reconfigure Localizable.strings
If you think the picture is too small, you can right-click to copy the picture to the new window to see
- Nslocalizedstring Groove Point
When using nslocalizedstring, the file name must be localizable.strings, case I have not tested, interested friends can self test, if the file name is not correct, you can only display the name of the key, not value.
iOS Development note--ios internationalization and the use of nslocalizedstring