iPhone - 系统字符串未在设备上本地化

发布于 2024-11-04 00:44:30 字数 334 浏览 2 评论 0原文

我使用 XCode 4 构建了一个项目,从现在起我就在模拟器上运行。我注意到系统类型“编辑”和“保存”按钮中的字符串是英语,但我的模拟器中的所有内容都设置为法语。我怀疑存在类似于 XCode 3 中的错误。

但现在我在我的纯法语配置的 iPhone 上运行,这些按钮仍然是英文,并且没有像我在其他应用程序中那样本地化。可以使用。

我注意到在我的 info.plist 中,“本地化本机开发区域”默认设置为“en”。我已在下拉菜单中将其更改为“Fr”或“France”,但这不会改变任何内容。

我如何纠正这个问题以使这些按钮显示本地化标题?

I build a project using XCode 4 and I was running on the simulator since now. I had noticed that the strings in System type "Edit" and "Save" buttons where in english, but everything in my simulator was set to french. I suspected a bug like the one I had in XCode 3.

But now I'm running on my pure french configured iPhone, and those buttons are still in english, and are not localised as in other apps I can use.

I noticed that in my info.plist, the "Localization native development region" was set to "en" by default. I've changed this to "Fr" or "France" in the drop down menu, but that does not chage anything.

How may I correct this to make those buttons show a localized title ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

掌心的温暖 2024-11-11 00:44:30

我基本上有同样的问题,但黑蛙的回答并没有真正帮助我。我做了一些研究,发现如下:

本地化主要基于捆绑包。使用 info.plist,您可以添加捆绑包中没有的本地化内容,但无法删除捆绑包中存在的本地化内容。

在 Xcode 4 中添加法语本地化的首选方法是执行以下操作:

  1. 在 Xcode 中打开项目 >= 4.0.2
  2. 单击项目文件
  3. 选择右侧 Project 标题下的项目
  4. 检查 本地化表。
  5. 选择您要复制的本地化版本(英语)
  6. 单击 + 并选择您希望应用程序使用的语言(法语)

如果您不想支持英语,则需要执行两个额外步骤:

  1. 选择您要删除的本地化版本(英文)
  2. 点击 - 并删除文件

特别感谢 Nekto 谁帮我解决了这个问题。

I had basically the same question, but Black Frog's answer didn't really help me. I did some research and this is what I found out:

The localization is primarily based on the bundle. With info.plist you can add localizations that aren't in the bundle, but you can't remove localizations that are present in the bundle.

The preferred way to add a French localization in Xcode 4 is to do the following:

  1. Open project in Xcode >= 4.0.2
  2. Click on project file
  3. Select item under Project title on the right
  4. Check Localizations table.
  5. Select the localization you want to duplicate (English)
  6. Click + and select the language you want you're app to use (French)

If you don't wan't to support English there are two additional steps:

  1. Select the localization you want to remove (English)
  2. Click - and delete the files

Special thanks to Nekto who helped me figure this out.

别在捏我脸啦 2024-11-11 00:44:30

您必须创建 nib 文件的本地化版本。或者,您可以将每个按钮/标签的文本设置为视图加载中的本地化字符串。

You have to create localized version of your nib files. Or you can set the text of each button/label to a localized string in view load.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文