Localize Asset Catalogs

后端 未结 4 1916
野的像风
野的像风 2020-12-12 18:18

I know it\'s a new feature and this may not be possible, but I would like to be able to localize an Asset Catalog in different languages, to show a localized launch image. T

相关标签:
4条回答
  • 2020-12-12 18:42

    I have the same problem in XCode 6.0 and iOS 7 and 8. Don't use Images.xcassets for splash screen. Add the following key to Info.plist:

    <key>UILaunchImages~ipad</key>
    <array>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>7.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Landscape</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
    </array>
    
    0 讨论(0)
  • 2020-12-12 18:46

    From Apple's documentation, you need to set the UILaunchImageFile key to a custom launch image filename.

    enter image description here

    You then need to have localize that file.

    enter image description here

    And make sure that your Launch Image is not set to use an asset catalog.

    enter image description here

    0 讨论(0)
  • 2020-12-12 18:49

    Asset Catalog assets and images localization is supported since Xcode 11.

    0 讨论(0)
  • 2020-12-12 18:58

    I went the classic way. Just use single localized images and set up your plist correctly. The easiest way is to use one asset catalog, set everything up. Then open the application bundle and copy the correctly named files + the correct info.plist entries. (And of course remove the assets catalog afterwards) Result looks like this:

    Info-plist:

    info plist keys

    Launch images filenames:

    launch images filenames

    (I needed all iPad orientations/sizes + all portrait iphone sizes + 7.0 specific sizes)

    0 讨论(0)
提交回复
热议问题