Xcode-目标特定的本地化 [英] Xcode - Target specific localization

查看:77
本文介绍了Xcode-目标特定的本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目包括几个目标,每个目标用于不同的客户.一些客户需要特定的本地化,但我不希望所有客户都获得此特定的本地化.由于本地化是在项目级别进行的,因此我没有找到仅针对特定目标添加本地化的方法. 有任何建议怎么做?

My project includes several targets, each target is used for different customer. Some customers need specific localization and I don't want all the customers to get this specific localization. Since localization is handled on the project level I didn't found a way to add localization only for specific target. Any suggestions how to do it?

寻找稳定的选项,而无需在每次构建前删除未使用的本地化.

Looking for stable option without the need to delete unused localization before each build.

推荐答案

我设法通过@Yitzchak答案+其他更改来解决它:

I manage to solve it with @Yitzchak answer + additional changes:

  • 在项目级别添加所需的语言.
  • 从目标中删除原始的可本地化文件.
  • 创建新的Localizable.strings/InfoPlist.strings并将其添加到目标中.
  • 在本地化"选项中仅选择相关语言(请参见下图)

这篇关于Xcode-目标特定的本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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