My Previous Code without Localization. It worked perfect.
case LOGIN_LOGOUT: ((Cell*)cell).lbl.text = [self isLoggedIn] ?
[NSString stringWithFormat:@"Logout %@", email]
:NSLocalizedString(@"Login", @"Message");
break;
But when I implement Localization in Logout the email will not show.
case LOGIN_LOGOUT: ((Cell*)cell).lbl.text = [self isLoggedIn] ?
[NSString stringWithFormat:NSLocalizedString(@"Logout", @"Message") ,"%@",
email] :NSLocalizedString(@"Login", @"Message");
break;
I know I am missing some basics in stringWithFormat but can anyone offer some guidance to me?
You are looking up the localisation of "Logout". You are using that as a format string. That's not likely to work. Don't make statements that are too complex, it makes it impossible to debug.
I'd write
And now you can actually debug that whole mess. The stringWithFormat parameters look very, very dodgy.