Arabic and English text together in same label or in alert message

49 Views Asked by At

I am getting message from backend which contain both Arabic string as well as englist string when i set that message on alert it looks same as attached SS. original message = "+966897845123 أدخل كلمة المرور لمرة واحدة (OTP) التي تم إرسالها" Actual Result when set to alert message

I'm expecting exact same string in UI also..How can i set this string for proper result.

Tried some stack overflow solution but didn't work

1

There are 1 best solutions below

0
Ghulam Mustafa On

Try this when setting the string to UILabel

yourLabel.text = "\u{202A}+966897845123 أدخل كلمة المرور لمرة واحدة (OTP) التي تم إرسالها\u{202A}"