NSLocalizedStringFromTable doesn't work

Tomasz Szulc picture Tomasz Szulc · Feb 6, 2014 · Viewed 7k times · Source

I'm trying to use NSLocalizedStringFromTable but with no results. I've got created Profile.strings file, clicked localized, in project settings I add Polish and English languages, so my file has 2 "files" inside and I typed the same strings with other values but when I switch languages and restart app there is still one localization used (Polish).

Profile.strings in Xcode:

Profile.strings
    Profile.strings (Polish)
    Profile.strings (English)

Polish:

"fullName.placeholder" = "Imie i nazwisko";

"emailAddress.placeholder" = "Adres email";

"phoneNumber.placeholder" = "Numer telefonu";

English:

"fullName.placeholder" = "Full name";

"emailAddress.placeholder" = "Email address";

"phoneNumber.placeholder" = "Phone number";

To get value I call:

NSLocalizedStringFromTable(@"fullName.placeholder", @"Profile", @"");

Any time I call this I've got value from Profile.strings (Polish)

What I'm doing wrong?

Answer

freelancer picture freelancer · Feb 6, 2014

try to Reset Content and Settings of simulator it will work (: