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.

Kalpit
  • 279
  • 1
  • 3
  • 4

4 Answers4

46
  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.

Venu Gopal Tewari
  • 5,672
  • 42
  • 41
  • Excellent! Thank you. – Chrstpsln Oct 04 '17 at 15:10
  • 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. – PICyourBrain Feb 05 '18 at 19:55
  • 7
    @PICyourBrain 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. – Venu Gopal Tewari Feb 08 '18 at 19:07
  • 2
    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. – Alex Medearis Feb 27 '18 at 19:15
  • 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 https://stackoverflow.com/questions/25736700/how-to-localise-a-string-inside-the-ios-info-plist-file – James Y Feb 27 '18 at 19:30
  • 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. – NeoWang Jun 20 '19 at 14:09
  • 2
    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) – Shan Dec 11 '20 at 10:03
  • 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.... – thisIsTheFoxe Jan 07 '21 at 17:23
  • this solution not work anymore – xgqfrms May 24 '22 at 02:51
30

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.

samwize
  • 25,675
  • 15
  • 141
  • 186
7

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.

JaredH
  • 2,338
  • 1
  • 30
  • 40
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

keshav
  • 96
  • 7