Localizable Splash / Launch Screens for iOS

Hello, I am new to Capacitor and I am trying to localize the Splash / Launch Screen for the iOS app I am working on, which is built with Capacitor. By “localize”, I mean having it display in different languages based on the language of the device.

I have a different Splash Screen for different languages.

In native iOS, one uses Info.plist to specify the name “LaunchScreen” for setting “UILaunchStoryboardName”.

And if I want to specify a different value for a different language, I simply create the InfoPlist.strings file and localize it depending on the language.

In Capacitor I am also using Info.plist to specify the name of “LaunchScreen” for UILaunchStoryboardName.

However, I am not able to localize in capacitor as the configuration for UILaunchStoryboardName in InfoPlist.strings is disregarded because this line is executed when loading the app:

let storyboardName = Bundle.main.infoDictionary?["UILaunchStoryboardName"] **as**? String ?? "LaunchScreen"

In order to be able to localize the Launch Screen, that line should be (note the localizedInfoDictionary vs. previous infoDictionary):

let storyboardName = Bundle.main.localizedInfoDictionary?["UILaunchStoryboardName"] **as** ? String ?? "LaunchScreen"

I cannot change this line of code because it is in a Capacitor dependency called “SplashScreen”. Apparently, I have to use this dependency because otherwise the Launch Screen will not appear at all.

Is there any way to modify the configuration of SplashScreen dependency to be able to localize the SplashScreen?

Or is there a way for the Splash Screen to appear without using this dependency (which I think would enable the use of localization configurations in InfoPlist.strings)?

Any suggestions are welcome.

Thank you!

Launch screens should not be localized. From the Apple Human Interface Guidelines:

Avoid including text on your launch screen. Because the content in a launch screen doesn’t change, any text you display won’t be localized.

1 Like

Hello @aparajita. Thanks for your reply!

We ended up taking out the “words” in the logo of the company. The name of the company was in different languages according to the country. When using Swift and Xcode, it allows to localize the launch screen as well. Therefore we thought it would have been possible in Capacitor to do so.

But thanks for the reference to Apple’s documentation which says “Avoid including text on your launch screen. Because the content in a launch screen doesn’t change, any text you display won’t be localized.”

I think that is what I needed to justify why we are taking out the words from the company logo for the Splash Screen.

I am working on a splash screen plugin, I’ll see if it’s possible to use a localized launch screen.

1 Like