문제

  • "Application has localized display name" = YES in Info.plist
  • Localized CFBundleDisplayName & CFBundleName in InfoPlist.strings

  • When I change the language of the whole device, it works. It changes the name of my app.

  • When I install it, the name is in the language of the device.

I manually change the app language from inside the app with NSUserDefaults language setting. Everything inside the app is perfectly localized whenever I change the language from inside the app. (Needs a restart of app)

But the app name does not change this way, the only way for it to change is, changing the device language.

Am I missing something? Is there a way to change the app name when the language is changed?

올바른 솔루션이 없습니다

다른 팁

Unfortunately, I don't think you can.

iOS has no way to tell what language preference is set inside each application (well, it could, but it's not done that way). Instead, it uses the system-wide setting to find and display the appropriate CFBundleDisplayName for every application.

Developing a custom language preference inside an app is also not the recommended way. Apple expects users to set their language of choice in the device's Preferences, not from inside individual apps (see here: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPInternational/Articles/InternatSupport.html#//apple_ref/doc/uid/20000278-SW1). As an example, there's no way to change Facebook's language from inside the app, but as soon as you change the device's global language setting, the Facebook app reflects the change.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top