ios - UITextview shows text Arabic but numbers English -


i want show arabic text , number of uislider value in uitextview example:

مقدار= ۴۰

i using code:

 self.mytextview.text= [nsstring stringwithformat:@"%f", self.myslider.value]; 

uitextview shows arabic text correct value adding english characters. how can concatenate slider value uitextview show them arabic characters too.

you should use nsnumberformatter.

nsnumberformatter* formatter = [nsnumberformatter new]; [formatter setlocale:[[nslocale alloc] initwithlocaleidentifier:@"ar"]];  textview.text = [formatter stringfromnumber: @(slider.value)]; 

Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -