Nielsou Hacken-Bergen
Nielsou Hacken-Bergen

Reputation: 2626

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 french, it's still in english: 'Done'. Do you know what I am missing ?

Thanks,

Upvotes: 1

Views: 1490

Answers (3)

AliSoftware
AliSoftware

Reputation: 32681

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)

Upvotes: 1

Tom
Tom

Reputation: 1349

Set the

Localization native development region 

key in your info.plist to your region (fr).

Upvotes: 1

iNoob
iNoob

Reputation: 3364

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

Upvotes: 0

Related Questions