Localization of Nib files

in #developer5 years ago

After the XIB file is localized, if you want to customize the nib version corresponding to the selection, instead of following the system environment to switch languages, you can use the following methods:

1511846-2ad5277dae98e4fa.png

After the storyBoard is localized, the images used in it should also be localized. If you use the images in the Assets.cassets folder, you need to create a resource folder of type "Group" in the project separately, because Assets does not have resource localization. Also note that the folder type is "Group" (orange) instead of "folder" type (blue). Otherwise the picture will not be referenced.

You can create an inforPlist.strings file, which can be set to localize the application name, user permission prompt, guide page, etc. The details are as follows:

1511846-dc4177db9a082d74.png

1511846-7d1ee3dcae81c3dc.png

UILaunchStoryboardName is the corresponding LaunchScreen.storyboard, so this method creates two launch story board files. This method has the problem of image size adaptation. If there is a better solution, I hope that big man can give pointers.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64420.25
ETH 3150.23
USDT 1.00
SBD 3.99