How to specify the path of localized Info.plist file
Asked Answered
A

1

6

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 ?

Ambary answered 5/4, 2017 at 9:27 Comment(1)
Possible duplicate of How to localise a string inside the iOS info.plist file?Ambrosial
H
3

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

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

Hyrup answered 5/4, 2017 at 9:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.