如何根据所选语言更改iPhone应用程序名称? [英] How to change iPhone app name according to language selected?
问题描述
是否可以根据用户的语言偏好更改应用名称?
Is it possible to change app name according to the user's language preferences?
例如,如果英语是用户iPhone的语言,则应用名称为Hello,如果语言是法语,它将是Bonjour。
e.g If English is the language of user's iPhone then app name is "Hello" and if the language is French it would be "Bonjour".
提前致谢。
推荐答案
1-添加一个plist文件项目
2-命名为InfoPlist.strings
3 - 通过添加法语使其本地化
4- xcode将创建两个版本:一个用于英语,另一个用于法语
1- add a plist file to you project 2- name it InfoPlist.strings 3- make it localized by adding a french language 4- xcode will create two version: one for english and the other for french
打开英语版本并添加该行:
open the english vesion and add the line:
CFBundleDisplayName =Hello;
CFBundleDisplayName="Hello";
打开法语版并添加行
CFBundleDisplayName =Bonjour;
CFBundleDisplayName="Bonjour";
测试您的应用程序,您将看到您的应用程序。根据用户本地名称chane。
test your application and you will see your app. name chane according to the user local.
这篇关于如何根据所选语言更改iPhone应用程序名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!