How to make iOS app name localizable? [duplicate]

一笑奈何 提交于 2019-12-28 11:53:32

问题


I'm trying to find the easiest way to localize my app. I'm using sqlite, so I need basically only to switch my database name. Problem is the app name - can it be localized from code or I have to make x apps for x languages, so anyone will have app name in his/hers native language? The latter one seems like already rejected app to me... anyone?


回答1:


I assume you mean the Bundle Display Name that appears on the device's home screen: You should create a localized file called InfoPlist.strings similar to the Localizable.strings file that you use for the usual text snippets.

In the InfoPlist.strings you can localize the different keys from your Info.plist. To localize the app name add:

"CFBundleDisplayName" = "My localized app name";

To localize a file: Simply create a new strings file in Xcode. Then reveal the right Xcode pane and add localizations via the menu shown here:

Using this technique you can localize any file you like. Simply add the correct version to your bundle. If you then use [[NSBundle mainBundle] pathFor... you will automatically get the path to the correct localization. We do this for sqlites, strings and sometime even images.




回答2:


You can set the App Name independently for each country iTunes officially supports native language translations through iTunes Connect.

That's the only way to do this and you can do this ONLY for the app stores around the world that DO NOT use English as their main language



来源:https://stackoverflow.com/questions/10616650/how-to-make-ios-app-name-localizable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!