jowie
jowie

Reputation: 8068

Why is my app not picking up the text in the Localizable.strings file?

I'm trying to localise my iPhone app, and I've tried to Google for help and look on here but I can't find anything that I am doing incorrectly.

I have created a Localizable.strings file, which currently only contains:

/* 
  Localizable.strings
  AppName

  Created by Joe on 25/10/2011.
  Copyright (c) 2011 xxx. All rights reserved.
*/

"DestinationHeader" = "I am going to";

I then went to the Localization tab on the right in XCode, and added "English" to the file. Now the file appears in my en.lproj folder in the bundle.

Then, in the view controller, I've added the line:

sectionTitle = NSLocalizedString(@"destinationHeader", nil);

But all that seems to be happening is the text "destinationHeader" is appearing instead of "I am going to". I'm obviously doing something wrong, does anyone have any ideas?

Thanks!

:-Joe

Upvotes: 1

Views: 1165

Answers (1)

Nekto
Nekto

Reputation: 17877

Try this:

sectionTitle = NSLocalizedString(@"DestinationHeader", nil);

You should enter the same value of key in localizable.strings and it is case sensitive.

Upvotes: 6

Related Questions