Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localization of Default.png is not working

I wonder if anyone has encountered the same problem and how they solve it.

I want to localize Default.png so I do the following steps which from what I understand should be the correct way (please correct me if I'm wrong).

  1. Select Default.png in xcode
  2. Command-I to Get Info
  3. Click on Make File Localizable
  4. Go back to General Tab (why Apple, why?)
  5. Click on Add Localization
  6. Enter es for Spanish according to this:
  7. In finder I replace the Default.png in the es.lproj folder

I have tried in both the simulator and on an iPhone with changing the language between English and Spanish, but I only get the original file. Other localizations like app name and strings works just fine, but not this one...

I'm on xcode 3.2.3

Thanks

like image 720
Structurer Avatar asked Aug 06 '10 07:08

Structurer


3 Answers

I'd thought I'd add the answer for localizing Launch.xib.

  1. Create InfoPlist.strings file. (File,New,Resource,Strings)

  2. Localize it and select your languages

  3. For e.g. the Spanish version, add your launch screen key and name for the Spanish version of your Launch screen

    "UILaunchStoryboardName" = "Launch_es";

  4. Copy your existing Launch.xib to Launch_es.xib, and change the text and/or images to the Spanish translations or Spanish-named images.

like image 116
Matt H Avatar answered Oct 31 '22 18:10

Matt H


I got this solution from Developers Forum (credit to Sascha Paulus, thanks Sascha!).

I had a similar problem in another project with localization, but the solution worked for both issues.

Here we go:

  1. Delete App from Simulator (just to be sure)

  2. Delete all versions of the localized Default.png (in XCode & on Disc)

  3. Select Build > Clean All Targets

  4. If not done yet, make the Localizion Directories (e.g. es.lproj, de.lproj)

  5. Copy the localized Default.png in the appropriate Localizion Directory

  6. Go To XCode > Right Mouse Click on Resources > Add > Existing File ...
  7. Select the localized Default.png in the Localizion Directory
  8. Don't forget to mark "Copy items into destination group's folder...." > Add
  9. Repeat it with every localized Default.png

I think the trick is to delete the file you have a problem with, clean all and then add it again. If you don't have any localization there is no need to create a specific folder.

Give it a try, worked for me.

like image 28
Structurer Avatar answered Oct 31 '22 17:10

Structurer


I have had the same problem. I have solved it with this:

  • In the Simulator, menu "simulator iOs", option "restart content and settings".
  • In Xcode, menu "Build", option "Clean All Targets"

And when I have selected the button "Build and run" it has worked.

like image 24
intropedro Avatar answered Oct 31 '22 19:10

intropedro