在Xcode 4中移动本地化文件夹 [英] Moving localization folders in Xcode 4

查看:121
本文介绍了在Xcode 4中移动本地化文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从Xcode 3升级到Xcode 4.2,并迁移了现有的iOS应用程序以使用这个新版本。这个应用程序是本地化的,我现在想要添加另一种语言。

I've recently upgraded from Xcode 3 to Xcode 4.2, and migrated an existing iOS apps to use this new version. This app is localized, and I now want to add another language.

在Xcode 4下,当我添加新的本地化时,它会在项目根目录中创建特定于国家/地区的文件夹。例如:

Under Xcode 4, when I add the new localization, it creates the country specific folder in the project root. For example:

/fr.lproj

但是,我以前的所有语言文件夹都在Resources子文件夹中。如:

All of my prior language folders are in a Resources sub-folder, however. Such as:

/Resources/de.lproj
/Resources/en.lproj

在我的生活中,我无法弄清楚如何让Xcode 4将新语言文件夹移动到资源。我找不到任何GUI选项。如果我使用Finder移动物理文件夹,Xcode只会将引用更改为红色,但是我无法修复它。

For the life of me I cannot figure out how to get Xcode 4 to move the new language folder to Resources. There is no GUI option I can find. If I move the physical folder using Finder, Xcode just changes the reference to red, but gives me no option to fix it.

任何人都可以帮忙吗?

更新:

以下是一些展示问题的截图(这次使用中文):

Here are a few screenshots demonstrating the problem (using Chinese this time):

文件列表:

该文件的标识部分。请注意,我无法更改它:

The identity section for that file. Note that I can't change it:

推荐答案

找到解决方案。它不漂亮,但它确实有效。

Found the solution. It's not pretty, but it works.

这就是我的所作所为:


  1. 在Finder中查看 .xcodeproj 文件夹的内容

  2. 编辑 project.pbxproj file

  3. 在文件中搜索 .lproj

  4. 更改 path = 包含资源部分路径的部分。

  5. 保存,然后重新启动Xcode

  1. View the contents of the .xcodeproj folder in Finder
  2. Edit the project.pbxproj file
  3. Search for .lproj within the file
  4. Change the path = section to include the Resources part of the path.
  5. Save, then restart Xcode

这使所有内容平滑,并允许Localization驻留在Resources子目录中。

This smoothed everything over, and allowed the Localization to reside in the Resources subdirectory.

这篇关于在Xcode 4中移动本地化文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆