How to localize launch screen
Asked Answered
S

4

27

I have localized LaunchScreen.xib, through which the LaunchScreen is divided in two parts.

i.e. LaunchScreen.xib(English) and LaunchScreen.xib(Portugese), but when I change device language to Portuguese then LaunchScreen.xib(English) is also loaded.

Succentor answered 6/5, 2015 at 14:11 Comment(2)
What language? Platform? Show us some code?Trap
In objective C, Sorry there is no code for this, i did it through Xcode existing functionality.Succentor
P
48
  1. Add multiple "LaunchScreen.storyboard" for each language from "Add New File" menu in project. (Lets say for spanish - Launch Screen_sp)

  2. Localize your "Info.plist" from identity inspector menu as InfoPlist.strings (Base) , InfoPlist.strings(Spanish) for each language you want to use.

  3. Now as example: in InfoPlist.strings (spanish) add following key :

    "UILaunchStoryboardName" = "LaunchScreen_sp";

and you are done. Do not forget to set "LaunchScreen" as your Launch Screen File in "General" settings of your project.

Phototonus answered 1/8, 2017 at 11:41 Comment(9)
Excellent! Thank you.Murcia
Are people getting this to work? I tried it but it doesn't seem to automatically switch based on the language setting on the device.Changeup
@Changeup There is a limitation with this approach it takes dynamic Launch Screen on first install with respect to language but if you change the language afterwards it does't work.Phototonus
This is not actually implementing a localized LaunchScreen. If you're explicitly modifying the plist to use LaunchScreen_sp, you're saying "always use the Spanish launch screen" instead of "use the Spanish launch screen when in Spanish speaking countries." I believe that launch screens are cached as PNGs under the hood. This was implied by the way the feature was originally presented at WWDC: "With iOS 8, you can now provide an Interface Builder document and, at runtime, have the OS generate all of the necessary Launch Images for you." As a result, I don't think localization is possible.Biltong
In Xcode 9, you can localize in the File/Identity Inspector (rhs) using the "Localize ..." button, but this doesn't work for the Info.plist file! In step 2 above, refer to this #25737200Wretch
This is great. But will this hack fail in future iOS versions? Apple quite clearly declared LaunchScreen as static and not localizable in its documentation.Fadge
It does's work for me. The app will show Launch_Screen_sp then show Launch_Screen_base. (Xcode 12.2 with iOS 14.2)Clot
For me it does work, but it doesn't change when changing the language. My guess, Apple includes only one LaunchScreen when installing the app. So, you would need to reinstall to change it....Molybdenum
this solution not work anymoreTroyes
A
31

The answer is: you cannot localize launch screen

In the Human Interface Guideline, they pointed out:

Avoid including text on your launch screen. Because launch screens are static, any displayed text won’t be localized.

Text cannot be localized.

What about images?

I have tried localising, and as of April 2017, I concluded that localization doesn't work. The localized storyboard will be ignored.

Aryanize answered 13/4, 2017 at 7:6 Comment(3)
There exist some hacks, but the best answer should be "You shouldn't localize your launch screen"Buck
could you indicate which hacks?Sherri
I confirmed that localization of images on the Launch screen still doesn't work on Xcode v11.4...Jordonjorey
J
8

As user: Samewize pointed out, the User Interface Guidelines advise against localizing text on the Launch Screen.

Avoid including text on your launch screen. Because launch screens are static, any displayed text won’t be localized.

To add to that, as of September 2019, even with localization of asset catalogs (WWDC 2019 Video), I've been unable to localize images that appear on the Launch screen. I'm assuming the Launch screen is statically generated and does not take Localization into account.

Jollenta answered 30/9, 2019 at 17:34 Comment(0)
L
0

As per Apple we can't localise splash screen here is the link:-

https://developer.apple.com/design/human-interface-guidelines/patterns/launching#launch-screens/ enter image description here

Lw answered 14/12, 2022 at 7:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.