5

I want to know the current input method the user is typing in such as En (english), German, Chinese, etc... Maybe keyboard type is what I am after, but documentation seems limited on this subject from Apple doc.

Thank you!

Managing the iPhone Keyboard http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html

Unikorn
  • 1,140
  • 1
  • 13
  • 27
  • Possible duplicate of [Detecting current iPhone input language](http://stackoverflow.com/questions/1414876/detecting-current-iphone-input-language) – zxcat Feb 20 '16 at 01:16

3 Answers3

9

In iOS4.2 there is a new class UITextInputMode that is exactly what you want. (Oops, this is still under NDA. If you have no iOS dev center account please don't read this answer ;) )

You can query current mode (English, French, Japanese, etc) or get notifications when it changes (the keyboard language changes)

UITextInputMode documentation (requires log in)

nacho4d
  • 43,720
  • 45
  • 157
  • 240
  • +1 Thanks! That is what I am looking for, but thats unfortunate it took 4 iteration to come out with that and kinda useless to me if is limited to 4.2 – Unikorn Oct 05 '10 at 03:32
1

currentInputMode is deprecated since iOS7, be careful.

currentInputMode

Returns an instance representing the current text-input mode. (Deprecated in iOS 7.0.)

Community
  • 1
  • 1
Nikita Pestrov
  • 5,876
  • 4
  • 31
  • 66
0

here is a tutorial

http://www.switchonthecode.com/tutorials/a-simple-localization-example-for-the-iphone

NSLocale* curentLocale = [NSLocale currentLocale];
Aaron Saunders
  • 33,180
  • 5
  • 60
  • 80
  • 2
    In any local, you can have more than one input methods. This is quite common in asian languages such as chinese input method: traditional, simplifed, pinyin, german, etc. – Unikorn Oct 05 '10 at 03:27