I have an application where I have it UITextField.
My application is an Anglo-Arabic application.
Now I have the following.
addPostVideoURL.backgroundColor = [UIColor clearColor];
addPostVideoURL.textAlignment = NSTextAlignmentNatural; <-- Setting alignment
addPostVideoURL.textColor = pGray_343434;
addPostVideoURL.placeholder = localize(@"videoURL");
[addPostVideoURL setValue:pGray_343434 forKeyPath:@"_placeholderLabel.textColor"]
addPostVideoURL.font = [self adjustDefaultFont:40];
addPostVideoURL.autocorrectionType = UITextAutocorrectionTypeNo;
If you see, I set the alignment text as NSTextAlignmentNatural. I did this because if the keyboard is Arabic (and my application is English or Arabic), I want the text box to start on the right side.
With this, when I changed the keyboard to English, the text field starts with LTR, and if I change the keyboard to Arabic, start the text field with RTL. However, the placeholder that I have is always on the left.
In any case, how can I do base alignment based on the application language?