0
votes

Here is my code:

    NSString *string = [bundle localizedStringForKey:@"kTCStringMissing" value:@"" table:nil];

I know that the bundle variable is pointing to the correct bundle because the English value is coming out correctly -- see below.

My bundle structure looks like this:

ToyCalculatorUI.bundle  
  en.lproj [directory]  
    Localizable.strings [file]
  de.lproj [directory]
    Localizable.strings [file]

My Localizable.strings look like this:

in the en.lproj directory:

kTCStringMissing = "Missing Fields en";

in the de.lproj directory:

kTCStringMissing = "Missing Fields de";

But when I run my app in the simulator, after setting the language to Deutsch, and the region to Deutschland, the *string object above always has value "Missing Fields en".

What am I missing?

1

1 Answers

0
votes

imho you have to quote the keys, too. (see Apple's Resource Programming Guide for details)

i.e. "kTCStringMissing" = "Missing Fields en";