1
votes

I have the common Info.plist that I want to localize. I also have the InfoPlist.strings which has InfoPlist.Strings (Spanish) and InfoPlist.Strings (Base).

enter image description here

My problem is that when I go to Editor > Export for Localizations... the XLIFF file it generates does not have any of the Info.plist entries I need to localize in Spanish (My Base localization is English). It also won't include anything I've manually added InfoPlist.strings.

If I manually add them to the XLIFF, the entries I add get deleted upon Import. If I manually add them to the InfoPlist.Strings (Spanish) and then export, the entries I manually added get wiped out.

I really am at a loss here on how to localize my plist file because whatever direction I go, the entries get deleted.

There's an InfoPlist.strings in my es.lproj and my base.lproj folders.

I have to say the only entry that doesn't get wiped out is in my Spanish file for CFBundleName.

3
Same problem here. Were you able to figure it out?guido
@guido - Sort of. See my answer below. :)Mario A Guzman

3 Answers

1
votes

I was able to get this working but not in a way that was so obvious.

First, I removed the InfoPlist.strings file from Xcode and then closed Xcode completely.

I then opened my project folder and manually created an InfoPlist.strings file in each of my lproj folders. I named each one the same: InfoPlist.strings.

I did this even for the English lproj folder even though my strings would fall into the base lproj folder.

Re-open Xcode.

Even though these still don't export via Export for Localizations... option in the Editor menu, I had to manually do it within Xcode. Exporting/Importing didn't seem to mess with these files and fortunately, Info.plist files don't have much that needs translating.

0
votes

Change the InfoPlist.strings localization from Base to English, then everything works fine for both export and import.

0
votes

I had the same issue with a plist key that I added manually, and just by adding that key to both Base and English localizations before exporting it didn't delete the custom string anymore. (Adding it to the English localization seems to be key here)