开发者

Localize iPhone App name in Xcode 4

When I select the Info.plist file so that the App name can be localized and try to build the project, the build fails with an error saying that the Info.plist file cannot be found.

If I change the Info.plist file path to PROJECTNAME/en.lproj/Info.plist it builds, but the App's开发者_运维百科 name is not localized; if I run on a Portugues iPhone it has the English name.

Why?

Thanks,

RL


Add InfoPlist.strings to your project and localize it. Put this in different languages:

"CFBundleDisplayName" = "App Name";


Here is a solution I found tonight / localized app names / xcode 4.5:

  • First change the name of you app: Folder Supporting Files InfoPlist.strings (Portuguese)
  • By selecting InfoPlist.strings (Portuguese), its content will appear in the window right next to it.
  • Put that code inside:

    "CFBundleDisplayName" = "Title in Portuguese";
    
    "CFBundleName" = "Title in Portuguese";
    
  • Then SAVE the file.

  • Go to the iOS simulator, and change language to anything but Portuguese. This will permit to reset the app icon.
  • Run your app.
  • Change your iOS language to Portuguese. You should then see the Portuguese name.


iPad and iPhone have different space available for displaying the app name, probably it comes from their icon size (57px vs. 72px)

So sometimes what fits perfectly on iPad is truncated on iPhone.

You can have different display names on iPad and iPhone like this:

"CFBundleDisplayName~iphone" = "iPhone display name"
"CFBundleDisplayName~ipad" = @"iPad display name"


Click on the file inspector Add localize language under you localize section Change your CFBundleDisplayName to your desire bundle app language This may help you out

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜