Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show specific language keyboard when user input values in UITextField in iPhone App?

I want to build an iPhone Application which supports multi-language. In that I want to input values in the language which user has selected from a set of languages in my application's settings. Accordingly, it should show selected language keyboard.

For eg : If user has selected French Language from my application's setting. Then in all the UITextFields of my application, user should be able to input values in French Language. So for that when keyboard opens I need to make sure that it is French Language Keyboard which it shows every time instead of default language keyboard.

So the question is, is It possible to show specific language keyboard whenever user taps on UITextField based on the language selected in the application's settings? If yes then how?

like image 505
darshit261991 Avatar asked Nov 01 '22 10:11

darshit261991


1 Answers

You can't do this without change device languages whether it is from setting or via coding like this. //ex spanish language (es).

NSArray *langOrder = [NSArray arrayWithObjects:@"es", nil];
[[NSUserDefaults standardUserDefaults] setObject:langOrder forKey:@"AppleLanguages"];

this will just change language order..

you cannot control the keyboard according to your selected language. The user chooses which keyboards they would like available via the settings application and can toggle between them using the globe icon on the keyboard.

like image 142
Dipen Chudasama Avatar answered Nov 12 '22 15:11

Dipen Chudasama