Localize Done Button for MPMoviePlayerViewController

I am using MPMoviePlayerViewController to represent the video. Everything works as expected, but if I switch the device language, for example. German, the Finish button is not localized.

I tried to access the button and install it in my own button implementation as follows:

MPMoviePlayerViewController *mp = [[MPMoviePlayerViewController alloc] initWithContentURL:url];

NSLog(@"%@", mp.navigationItem.leftBarButtonItem); // always null, but why?

// override button with locale 
mp.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Zurück"
                                             style:UIBarButtonItemStyleDone 
                                             target:self 
                                             action:@selector(dismissMoviePlayer:)];

[self presentMoviePlayerViewControllerAnimated:mp];

A similar question was previously asked, but he never received answers: objective-c MPMoviePlayerViewController programming language .

Thank you for your help.

+5
source share
2 answers

check CFBundleDevelopmentRegionin your Info.plist

+11

Info.plist xml ( ) . :

<key>CFBundleDevelopmentRegion</key>
<string>es</string>

( )

0

All Articles