Search code examples
iosobjective-cxcodenslocalizedstring

Adding new language to existing localized app


I have an app that uses localization, I need to add one more language, I want to display two different language images of same name in one xib file, the xib file is not localized as I am localizing the images. Can it be done using interface builder, without writing any code?


Solution

  • Add the images to your localized subdirectories in your project (en.lproj, es.lproj, etc.) and iOS will pick up the correct image when it unarchives the localized xib file.

    Xcode can do this for you automatically: Just select the resource you want to localize (an image, xib file, etc.), display the File Inspector pane, and then click the Localize button.

    (As a side note, it's a bad practice to localize a high number of images. You should remove text from images and choose them so they are "neutral" and "understandable" in every region of the world. Your app size will thank you for it.)