问题
Why does an NSError * error object with NSURLErrorDomain always return the error.localizedDescription in english ?
回答1:
The answer to this question can be found in the project settings. You have to add the language you are interested in to your project Settings:
- Select the Project in the left navigate
- select the project (not the target)
- select the "Info" pane
- add the language to the "localization" section
回答2:
Language is the first available in your project according to your languages order in the settings
回答3:
In your "iOS Simulator" (or in your testing device) start "Settings" app and select the required testing language. Start your app again and you will get the correct localised Description.
来源:https://stackoverflow.com/questions/21733837/nserror-localizeddescription-always-returns-english-error-message