I have followed Apple's documentation on localizing iPhone software, using the genstrings ruby script to create my strings file, and have localized all of my nib files. I also looked on both Apple's message boards, and around the net to try to find the solution.
I have made sure that all strings files are UTF-16, and changed my build setting 'Strings file output encoding' to UTF-16, but both in the simulator and on device, the localization keeps switching even though
NSArray* languages = [[NSBundle mainBundle] preferredLocalizations];
NSString* preferredLang = [languages objectAtIndex:0];
outputs the user-selected language correctly. Is there something I am missing, or is this just a bug?