Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change Bundle Display Name based on the country?

Tags:

xcode

ios

iphone

I would like to change bundle display name with respect to the user's setting. So can I change the display name based on the country configuration?

like image 856
San Avatar asked Jan 24 '11 19:01

San


1 Answers

sure, you have to "localize" a file named "InfoPlist.strings" (it's just a text file, you can do it in simple text and then import it in your project), where you need to write this:

/* Localized version of app name for Info.plist */

CFBundleDisplayName = "iYourNameInEnglish";

for the english version, and:

/* Localized version of app name for Info.plist */

CFBundleDisplayName = "ilTuoNomeInItaliano";

for the italian version, and so on...

to "localize" a file you just have to select it in your project (after you have imported it), then open its info, go to the general tab/section and choose the "make file localizable" button, then chose the language version you want to activate.

Now in the file "yourProjectName-info.plist" get the voice "Localization native development region" and choose the default language (it will be used for any language that you haven't localized), and the voice "Bundle display name" setted to "${PRODUCT_NAME}" (it should already be so)

luca

like image 164
meronix Avatar answered Oct 06 '22 00:10

meronix