Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify the path of localized Info.plist file

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 ?

like image 420
Whirlwind Avatar asked Oct 29 '22 09:10

Whirlwind


1 Answers

You should use an InfoPlist.string file. here is a related issue.

How to localise a string inside the iOS info.plist file?

like image 96
Fitzgerald Muiseroux Avatar answered Nov 15 '22 06:11

Fitzgerald Muiseroux