Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
767 views
in Technique[技术] by (71.8m points)

ios - Xcode - Target specific localization

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Create a separate "Localizeable.strings" for each target.

link the correct strings files with each "group" of strings.

Then set it in the Build Phases for each target the correct "strings" like this:

Setting Localizable resource for target


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...