Description: Libreoffice doesn't correctly set text direction when opening plain text files. Steps to Reproduce: 1. Write a plain text file with mostly RTL language (E.g: Arabic: https://ar.wikipedia.org/wiki/ليبر_أوفيس) 2. Open it with Libreoffice writer Actual Results: Text direction is LTR Expected Results: Text direction is RTL Reproducible: Always User Profile Reset: No Additional Info: I suppose Libreoffice already have language detection capabilities. If not, please take a look on Google's language detection library: https://github.com/Mimino666/langdetect.
AvidSeeker, please add a plain text file with rtl language as this makes it easier for us to verify the bug. thank you. => NEEDINFO
Created attachment 189715 [details] Plain text RTL document example
[Automated Action] NeedInfo-To-Unconfirmed
That makes sense to me. If gedit displays the sample text RTL, why shouldn't LO do the same, setting the page style accordingly? Or at least recognise the language properly per paragraph, and set its direction accordingly. Weirdly, when importing the sample file, the paragraphs are assigned the Hindi language instead of Arabic... (same in OOo 3.3) Tested with recent master build: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2902ab24ecc5ffbf4907ea83b2028508b9de6364 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: es-MX (en_AU.UTF-8); UI: en-US Calc: threaded
My Thunderbird extension does this for incoming plain text emails... https://github.com/eyalroz/bidimailui/