Bug 492042 - RTL subtitles display problem (help wanted: external solution exists but needs porting into kdenlive)
Summary: RTL subtitles display problem (help wanted: external solution exists but need...
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Title Clips & Subtitles (other bugs)
Version First Reported In: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Ron
URL:
Keywords: rtl, triaged
: 459638 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-22 13:56 UTC by haykelgg
Modified: 2026-01-29 19:20 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
bug (24.17 KB, image/png)
2024-08-22 13:56 UTC, haykelgg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description haykelgg 2024-08-22 13:56:52 UTC
Created attachment 172856 [details]
bug

Hey,

can you fix the RTL problem on the subtitles. When writing/ importing arabic/ persian subs the caracters like commas, points etc. are are displayed inversed.

RTL direction works fine with the Title tool.

Thanks in advance,
Comment 1 Tarig 2025-12-07 18:41:18 UTC
This is not a BUG in kdenlive. This issue is very common in situations where apps of part of an app does not deliberately address the RTL issue for Arabic Urdu, Persian or Hebrew, as explained here:
Unicode Characters: Adding special Unicode characters (Right-to-Left Embedding: U+202B) at the start of an RTL segment and Pop Directional Formatting (U+202C) at the end can "force" correct rendering in text-based subtitle formats (SRT, VTT).

The python script from this Github https://github.com/NabiKAZ/RTL-subtitle  fixes this. I wonder if it can be added to Kdenlive as a RTL option in Subtitles styles manager.

Thank you so much
Comment 2 Bernd 2025-12-07 18:48:50 UTC
Changed to Wish List
Comment 3 luzpaz 2026-01-29 12:49:51 UTC
> The python script from this Github https://github.com/NabiKAZ/RTL-subtitle  fixes this. I wonder if it can be added to Kdenlive as a RTL option in Subtitles styles manager.

Upstream Python script is small
See https://github.com/NabiKAZ/RTL-subtitle/blob/main/rtl-subtitle.py

Anyone willing to work on this ?
Comment 4 luzpaz 2026-01-29 12:55:48 UTC
The script's logic is by adding a Unicode "Right-to-Left Embedding" (RLE) character (https://unicode-explorer.com/c/202B) at the start of each line of subtitle text. The RLE character causes the text to be displayed in RTL reading order, which is useful for RTL languages.

1. The script reads an input .srt file.
2. It then processes its content to add the RLE character at the start of each line of text (but not timestamps).
3. It saves the modified content to a new output .srt file.
4. Paths for the input and output files are described in the main() function (sample_subtitle.srt and output_subtitle.srt by default).
Comment 5 luzpaz 2026-01-29 19:20:03 UTC
*** Bug 459638 has been marked as a duplicate of this bug. ***