I had to localize Privacy - Camera Usage Description key located in Info.plist. So what I did, is that I've localized it through the File Inspector. What happened is that Info.plist is moved to the Base.lproj. That is fine. Then, again inside of File Inspector, Localization section, I checked two more languages.
By doing this, additional Info.plist files are added into appropriate .lproj directories. So after I have added desired translations I run the project, but Xcode throw an error which says that path of Info.plist is wrong. That make sense because Info.plist is not at the same location anymore. So I've gone into Project Navigator, Build Settings section, and found a key that says Info.plist File and set its value to something like this:
MyProjectName/Base.lproj/Info.plist
Because the Info.plist file exists at that path, I was able to build/run an app, but still, it loads only the translation for the base language (english).
So, how should I specify the path of a localized Info.plist file ?
You should use an InfoPlist.string file. here is a related issue.
How to localise a string inside the iOS info.plist file?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With