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.