3

I am implementing a multilinqual application, there i have search funtionlity. In that i have placed uitextfiled.

When i change the language to arabic , and was testing the app. i found that particular uitextfield is always showing the english keyboard and not the arabic one.

The Phone language is set to arabic , but in the uitextfield it always shows the english keyboard. how is this happening?

below is my code

NSString *strPoemName = NSLocalizedString(@"Poem Name", @"Poem Name TextField");
           self.txtFieldPoemName = [[[UITextField alloc]initWithFrame:CGRectMake(10, 0, 270, 40)]autorelease];
            [self.txtFieldPoemName setFont:[UIFont systemFontOfSize:14.0]];
            self.txtFieldPoemName.autocapitalizationType = UITextAutocapitalizationTypeNone;
            self.txtFieldPoemName.autocorrectionType = UITextAutocorrectionTypeNo;
            self.txtFieldPoemName.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
            self.txtFieldPoemName.placeholder = strPoemName;
            self.txtFieldPoemName.delegate = self;
            self.txtFieldPoemName.clearButtonMode = UITextFieldViewModeWhileEditing;
            self.txtFieldPoemName.returnKeyType = UIReturnKeySearch;
            [cell.contentView addSubview:self.txtFieldPoemName];
user198725878
  • 6,266
  • 18
  • 77
  • 135
  • check this [link](http://iphone.appstorm.net/how-to/change-your-keyboard-or-display-language-in-ios/) – Mudit Bajpai Dec 26 '12 at 05:33
  • [Link](http://stackoverflow.com/questions/330542/setting-the-iphone-keyboard-language) say that you cant set keyboard language pragmatically. – HDdeveloper Dec 26 '12 at 09:29

2 Answers2

3

Just in case someone stumbles upon this problem again:

This is caused by setting the UITextField keyboardType property to UIKeyboardTypeASCIICapable instead of UIKeyboardTypeDefault.

Hemang
  • 26,840
  • 19
  • 119
  • 186
Nailer
  • 2,446
  • 1
  • 24
  • 34
0

Just make sure you do have set the value for "Poem Name" in Arabic localized Strings. May be because of that it would be showing only english keyboard.

Akshay Shah
  • 1,120
  • 6
  • 13
  • no i have set the localization. and also it displays the place holder string in arabic only. but it shows the arabic keyboard. – user198725878 Dec 26 '12 at 06:50
  • From your question it seems that ONLY THIS particular textfield is not showing the Arabic keyboard. If so, Are you creating the other textfields in the same way? Or is there any difference? – Akshay Shah Dec 26 '12 at 06:58
  • But is it correct that the problem is only for a textfield out of many created by same way? – Akshay Shah Dec 26 '12 at 08:32