direction
direction copied to clipboard
Getting wrong text direction when having a mix of languages
I have a text where I have a mix of 2 languages. For example: test זהו סעיף בעברית.
זהו סעיף בעברית alone is RTL and test alone is LTR. However when having : test זהו סעיף בעברית I get LTR.
I believe it's a bug somehow or a feature to add as I think it should know in percentage how much RTL exists over LTR in a text then format it correctly.
The algorithm checks the first character that is either LTR or RTL.
If you want percentages, create your own algorithm on top of direction.