Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localize app name when using XCode 8 and Swift 3

I have updated to Xcode 8 and Swift 3 and now my localized app names are not showing below the icon on the device or emulator home screen. Everything was working fine with Xcode 7.3.

I have defined a InfoPlist.strings file which has the following

"CFBundleName" = <App Name String>;
"CFBundleDisplayName" = <App Name String>;

The info.plist file I have

Bundle Name = $(PRODUCT_NAME)
Bundle Display Name = $(PRODUCT_NAME)

Also, I have added a Bool to info.plist named "Application has localized display name" and set it to YES.

However, what shows on the home screen is the default product name that is entered in the build settings product name field. So, it seems the InfoPlist.strings files is being ignored.

Is this a bug or does something need to be changed when localizing the app name for Xcode 8?

like image 226
gbotha Avatar asked Sep 22 '16 20:09

gbotha


1 Answers

I have the same issue, it seems like only Base localization is not working In my case i have Base and Arabic languages and it's working fine for Arabic and not working for any other language.

You can update info.plist and keep using InfoPlist.strings file,

Bundle Name = [App Name]
Bundle Display Name = [App Name]

Try not Basic language on a simulator/device. It should works

like image 86
Alex Avatar answered Dec 10 '22 21:12

Alex