Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename infoplist.strings file? [duplicate]

Is it possible to use other names for infoplist.strings file?
My problem: I want to create more than one target with different localized app names.

like image 976
cocoapriest Avatar asked Nov 29 '25 01:11

cocoapriest


2 Answers

You just create localized version of the same file. See my screen shot. And in there you set the name for each language for CFBundleDisplayName.

For example: In the english file: CFBundleDisplayName = "English name of the app"

In the French file: CFBundleDisplayName = "French name of the app"

iOS will load the proper localization file. And if a language is missing it will use the default language in the info.plist. In my case, it en.

like image 179
Black Frog Avatar answered Nov 30 '25 14:11

Black Frog


I've had what sounds like the same issue. I'm building two different apps from the same files, just with two different XCode projects, but the InfoPlist.strings files need to be different as they contain the name of the app. A simple solution I found is to use two separate folders inside of which your localized infoplist.strings are. For example:

+Version_A
  +en.lproj
     InfoPlist.strings
  +fr.lproj
     InfoPlist.strings
+Version_B
  +en.lproj
     InfoPlist.strings
  +fr.lproj
     InfoPlist.strings

Then in each XCode project you simply include the one relevant location (Version_A or Version_B) and not the other. If you do that too, check that the Copy Bundle Resources under your Build Phases pick the correct version (you can click Show in Finder from there).

like image 34
Clafou Avatar answered Nov 30 '25 14:11

Clafou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!