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.
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).
Related
After installing my app on a device it shows the following four languages:
As you can see there is two times Deutsch ("German") as an available language.
But this is how it looks like in XCode:
I wonder why there is this entry "Deutsch (Deutschland)" in my app because it doesn't appear in XCode. Maybe it has to do with the fact that I changed the development language to German? Or where else can I set the available languages for my app?
Fixed it in deed by changing the development language back to "English" and deactivating Base Internationalization.
In my app, I have several strings that I would like to programatically turn into notes in the iOS Notes.app.
I have done the part of calling Modal View of Notes.
I'm not 100% sure what you mean because your question is too general, but if you refer to Notes.app that ships with iOS - it has no URL scheme so it's not possible to communicate with the app in any way, nor is it possible to save notes there.
My question is... Can we use Xcode to create a tweak for jailbreaked iPhone? Foe example if I want to add some button in the lock screen how can I do? How can I mod the GUI of the default iPhone applications?
This is a really old question, but David is actually incorrect on most counts.
You can add custom UI to jailbroken devices, create tweaks without Xcode, hook into anything you wish, and more, without even having the source code for SpringBoard or wishing for it to be extensible.
MobileSubstrate is a code replacement platform that literally allows you to do anything. You don't even need to be an expert, but admittedly, having at least a moderate grasp on programming and Objective-C concepts helps a lot.
What you're talking about cannot be done. You're assuming 1) that you will have the source code for Springboard (lock screen), and 2) that those programs are extendable.
Without having the source code (it's proprietary), you cannot make "Tweaks" to the lock screen. You have nothing to compile into the lockscreen.
While you can mod them by editing the internal plists (simple things like show title bar or disable rotation), you will not be able to add functionality using XCode.
To create "tweaks" you would have to rewrite the lock screen entirely, or insert very low-level hooks into the Springboard/iOS. This is not possible via Xcode alone, since Xcode is not capable of even installing iOS-level apps (all installed apps are user-level).
You need expert knowledge of the private framework calls, and possibly be capable of disassembling and reverse engineering the specific program you're trying to extend.
I have implemented language change after restarting my app but my question is can I change my application language without restarting/closing it?
Any idea how to achieve this?
You can achieve this using the base functionalities of iOS, i.e. localization. What you can do is localizing your app in different languages, and let the iOS itself chose the right language to display when the application starts.
This way, if a user uses the iDevice in English, he/she will see your app in English (if you supported it as a localized language), if he/she uses the iDevice in French, he/she will see your app in French (again, if supported).
The official Apple page about Internationalization and Localization (also called i18n and l10n), can be of great help.
I am developing an application, in which i am giving user to select other language , by default the application will be in English , if user selects other language from the list.
The application language should be get changed to the respective language.
I know the concept of Localization, but if there any way to do that,
if i want to do that using localization please suggest me proper steps for that.
please suggest me solution for that.
Well, usually the language of the application is set from the language of the system (in phone settings), that's how most iPhone apps operate. If you go with that route - you get 'locale switching' for free, and NSLocalizedString method takes care of picking correct strings for you.