Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I localize UIImagePickerController

I've written an iOS app which uses custom localization (for various reasons). It undefines NSLocalizedString and replaces with an inline function of the same name which pulls it's values from an NSDictionary which is downloaded from a server.

My problem is this... Everything works fine, but standard UIKit views (namely UIImagePickerController) aren't being internationalized, which I believe is something that should happen automatically when the device language is changed?

For example, my full app is displaying it's japanese counterpart, but even though the device language is set to japanese the standard controls (UIImagePickerController and cancel button on search bars aren't showing!)

Any help would be much appreciated :D

EDIT

I have tried removing my redefinition of NSLocalizedString and I still have the same problem, so while advising me against redefining standard api functionality is great, it doesn't really help me with the issue I've encountered.

like image 398
TappCandy Avatar asked Nov 24 '11 14:11

TappCandy


1 Answers

Did you add the languages you wish to support to your app's definition? In XCode 4 this can be found in your Project Info page (see below).

UIKit views aren't shown in the device language if the device language isn't in the app's supported languages list. This is a good thing, otherwise in an app that uses the standard localization framework the user might see a mix of different languages (UIKit views would be in the device language and all the other content, being unavailable in the device language, would be in the app's base language).

Supported localization panel in XCode 4

like image 182
Clafou Avatar answered Sep 28 '22 18:09

Clafou