Search code examples
iphoneiphone-softkeyboard

international keyboard customized?


in iphone sdk 3.0 they have given option of international keyboards.user can choose the keyboard that he want. but how can we localize our application. for e.g if user have chosen a French language keyboard we should interact with him in french. like alerts and other things should get display in french language.

how can we do this programatically?Is their any option by which we can convert string from english to user's chosen language?

kindly help me


Solution

  • In iOS 4.2 and later, you can use the UITextInputMode class to determine the primary language currently being used for text input.

    [UITextInputMode currentInputMode].primaryLanguage will give you an NSString representing the BCP 47 language code such as “es”, “en-US”, or “fr-CA”.

    You can register for the UITextInputCurrentInputModeDidChangeNotification to be alerted when the current input mode changes.

    As Thomas Müller said, Internationalization Programming Topics is a good place to start.

    You might also be interested in the "Getting Your Apps Ready for China and other Hot New Markets" WWDC session.