Problem with UIBarButton Localization
UIBarButtonItem *button = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(sendRequest)];
[[[self navigationBar] topItem] setRightBarButtonItem:button];
[button release];
According to apple documentation, it's supposed to be localized. But when I turn m app to 开发者_Go百科french, it's still in english: 'Done'. Do you know what I am missing ?
Thanks,
Do test on a real device: I already had such issues with localization on the simulator (only on UIBarButtonItems and framework-embed controls like this, not on custom localized strings).
Changing the localization of the simulator sometimes seems not to be taken into account, especially for framework-provided strings like the default title of the back or done button or such, whereas it does work as expected on a real device.
(Also, I suggest you also set your CFBundleDevelopmentRegion
key in the Info.plist to French, that couldn't hurt)
Set the
Localization native development region
key in your info.plist to your region (fr).
Maybe you should try "Clean and Build" after changing the setting in simulator, or try deleting the application file of your program from, yoursystem->Library->Application support->iphone simulator->4.3.2->Application , try deleting those files and run.
Incase it still doesn't work, There is a good tutorial for this purpose http://www.raywenderlich.com/2876/how-to-localize-an-iphone-app-tutorial
精彩评论