Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localize launch screen

Tags:

localization

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.

like image 826
Kalpit Avatar asked May 06 '15 14:05

Kalpit


People also ask

How do you localize a storyboard?

Go to storyboard and click on UI Element that you want to localize. Select identity inspector, In Document portion you will see Object ID that we need to use for localize that element. Now goto localization file that created from step 3. In that string file you will see Object ID of elements.

How do I add launch screen?

If your project doesn't contain a default launch screen file, add a launch screen file and set the launch screen file for the target in the project editor. Choose File > New > File. Under User Interface, select Launch Screen, and click Next.

How do you localize in Swift?

Now, to add new languages, go to your project's settings, under the Info tab, click on + to add a new language, and select the files you want to localize. Your file is now localized. You can select in wich language you want to write by selecting the localized Localizable.


3 Answers

  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.

like image 52
Venu Gopal Tewari Avatar answered Oct 06 '22 10:10

Venu Gopal Tewari


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.

like image 41
samwize Avatar answered Oct 06 '22 10:10

samwize


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.

like image 31
JaredH Avatar answered Oct 06 '22 10:10

JaredH