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

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

问题描述

我的项目包括几个目标,每个目标用于不同的客户.有些客户需要特定的本地化,我不希望所有的客户都得到这个特定的本地化.由于本地化是在项目级别处理的,因此我找不到仅针对特定目标添加本地化的方法.

My project includes several targets, each target is used for a 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 couldn't find a way to add localization only for a specific target.

有什么建议吗?

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

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天全站免登陆