15

In my app I have three languages. The launchScreen.xib has three localzations too.

enter image description here

Like the localizable.strings I changed the text that should be used by the Object-ID.

enter image description here

When launching the App there is always the english text used, not the localized. And there is a "X" int he symbol of the LaunchScreen.xib and LaunchScreen.xib (Base). Why? How can I solve that issue?

Christian
  • 506
  • 4
  • 14

5 Answers5

9

The correct answer to specifically localizing the launch screen is here:

Localization of Default.png is not working

And for shortcutting I'll paste the main steps:

  1. Create InfoPlist.strings file. (File,New,Resource,Strings)
  2. Localize it and add the key "UILaunchStoryboardName" with the value being the name of the xib you want to be shown as the launchscreen for that localisation.

For e.g. for the Spanish version, add your launch screen key and name for the Spanish version of your Launch screen in the newly created InfoPlist.strings localized for spanish.

"UILaunchStoryboardName" = "Launch_es";

Community
  • 1
  • 1
Fawkes
  • 3,831
  • 3
  • 22
  • 37
  • I can't get this working. Are the xib files in Base.lproj? – Liau Jian Jie May 15 '16 at 14:23
  • 1
    @LiauJianJie No, they are not inside any "localized" folder. You should create them as you would create any other ordinary xib. The trick is you basically localize your setting file -> "Info.plist". But as we know, you cannot localize "Info.plist" in the ordinary way of ticking the languages in Xcode. For localizing "Info.plist" you have to explicitly create a "InfoPlist.strings" file. And then to localize the newly created "InfoPlist.strings". And only from now on, Xcode will look for your project settings in a localized manner, thus searching for a localized name of the launchScreen. – Fawkes May 15 '16 at 16:18
  • 1
    If anyone is having problems getting this working, check you aren't being silly like me by setting the language in the scheme instead of the device/simulator and expecting it to work. – Alexandre G Nov 12 '16 at 02:47
  • I found the left hand side of the key should not have quotes: UILaunchStoryboardName = "Launch_es"; – Ross Knipe May 29 '19 at 12:14
4

As Apple's document, launchscreen will never locale your text:

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

https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/

Truong Le
  • 111
  • 5
0

I would like to give clear description of fix according to previous info. I got the same issue and couldn't find clear description. I have Xcode 8.2.1 and Swift 3.0 now. Finally: I copied LaunchScreen.storyboard and added it to project with name Launch_ru.storyboard. After I did localization of Launch_ru.storyboard. Next need to choose it and add Base Localization. Next need to add to added during main localization file InfoPList.string key "UILaunchStoryboardName" = "Launch_ru"; where Launch_ru is name of my new Launch_ru.storyboard. These three actions fixed my issue.

Dmitry
  • 11
  • 1
0

Fawkes' answer is the right one:

  1. Create InfoPlist.strings file. (File,New,Resource,Strings)
  2. Localize it and add the key "UILaunchStoryboardName" with the value being the name of the xib you want to be shown as the launchscreen for that localisation.

One thing to note is that, all the launch screen storyboards that you'll end up having need to be barked as "Base localization" in the Files Inspector:

enter image description here

If you accidentally mark them as a localization for a different language, it will not work (it will just display a black screen!)

Constantine
  • 771
  • 7
  • 12
-1

I had same issue, after that i used MCLocalization it is very easy to integrate in your app. It worked perfectly for me

Noor
  • 2,071
  • 19
  • 28