Localization of Nib files

in #developer6 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.22
TRX 0.24
JST 0.038
BTC 94692.02
ETH 3236.92
USDT 1.00
SBD 3.29