Home > Software engineering >  text issue while using Persian alphabet with number in android
text issue while using Persian alphabet with number in android

Time:05-03

While using Persian text in Text or TextField compose, it won't show text in a proper way.
For example,

enter image description here

enter image description here

What should I do to handle this?

Edit:

for example I added simple Text:

enter image description here

Text(text = "3 بار فقط برای تستس")

pov: even this editor has the same issue, lol.

as you can see in this pitcure, right of string start with number; but in app, number goes to left of string, which you can see that in previous pictures. how can I fix that?

CodePudding user response:

You could try wrapping your text in a CompositionLocalProvider like so and let me know if i works.

CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl ) { 
      Text(...) // Check here
}
  • Related