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

Hey @murillotomas-euda, you’ll be happy to know I got localized splash screens working. Hope to have the plugin released sometime this week.

Hello @aparajita . Awesome!
Thank you very much for all your help! I will let the team know so we can do the change to the splash screen.

Taking longer than expected to finish it, I ended up rethinking the whole plugin. Definitely this week.

1 Like

I spent an absolutely absurd amount of time getting splash screens to work smoothly across all versions of Android. What a nightmare.

In any case, it’s working great now, and in addition localization and dark mode are now supported on Android. I just need to document everything now, which is a big job.

1 Like

Finally released it. Crazy how much time it took, but it’s just so much better than the official plugin. :grin:

The demo app shows how to do Brazilian Portugese localization.

Awesome. I already sent this to the team. Thank you very much for your response and your fixes! Great support!