[Last Call] Learn how to a build a cloud-first strategyRegister Now


Internationalize an iPhone application

Posted on 2011-10-12
Medium Priority
Last Modified: 2012-05-12
Dear Expert:

I'm working on an internationalized iPhone application already localized on 3 languages.

I have added a label on a view which I have entered text on one language. Where can I enter the translations for the other 2 languages ? Which actions should I do ?

I have seen there are 3 files (1 for language) with a list of words on the language of the file, but I don't know how to link a string from there to a control on the view.

I'm using last version of Xcode (4.1).

Any help would be appreciated.

Thank you.
Question by:gplana
  • 2
  • 2
LVL 20

Expert Comment

ID: 36954821

You need to use a localized string for your text see this link for a full explanation Localizing iPHone apps

Have a look at number 3 in the following link for more explanation.

LVL 15

Author Comment

ID: 36954855
Thank you for your help.

However, I think both links are related to strings on the code. I'm worried now on strings added directly on the view graphycally, by assigning its text property.

I think on previous xcode versions (version 3) this was called "Interface builder" but now it's integratted on xcode4.
LVL 20

Accepted Solution

darbid73 earned 2000 total points
ID: 36955135
Then maybe I do not understand you.

When you initialize your view you will need to set the label text.  Instead of


Open in new window

you will now use

NSLocalizedString(@"Hello", @"")

Open in new window

Then you will need to build a file for every language you want to suppport and in that file you will have the key

"Hello" = "What ever text you want on your label";

Open in new window

Now NSLocalizedString will return "What ever text you want on your label"
LVL 15

Author Comment

ID: 36955219
Oh, now I understand. Thank you.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question