简体   繁体   中英

How to create 2 diff. localisation for 2 target in swift?

In my iOS Application, I have 2 targets for both targets I am having localisation of same language but have diff. localisation string.

for one target I have created localisation like below which is working fine在此处输入图片说明

But for 2nd target, I can't have the same "Localisable.string" so I am having "Localisable-ABCD.string" 在此处输入图片说明

but for 2nd target, my localisation is not working.

Is there any way to localise for 2 targets?

Thanks for the help.

The idea is to set a target for different localization files.

Step 1: First, create a group folder for both targets with the same name and different locations. Like this

在此处输入图片说明

Step 2: Set target membership for both files from the file inspector pannel.

For Target 1 Localizable.strings file

在此处输入图片说明

For Target 2 Localizable.strings file

在此处输入图片说明

Note : Target 1 is the main app target in your project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM