Search code examples
githubright-to-left

Is there a way for GitHub to support Right-To-Left Files?


I have a repository which has a bunch of RTL (Right-To-Left) files. I keep this repository with the aim of making it public in the future and for people to contribute on it. (That's why I'm using GitHub instead of saving it locally on my computer.)

However, I noticed that only LTR files are properly formatted; RTL files end up looking weird. I know that .md files could be tweaked so that they could support RTL mode, but what about normal files (e.g., RTL text files, RTL source code, etc.)?


Solution

  • Update Jan. 2022: this is supported!

    Editor support for right-to-left languages

    Right-to-left languages are now supported natively in text editors for Markdown files, comments, and gists.

    Do you think they could be even better? Let us know how we can improve by contributing to our discussion.

    Editor support for right to left languages:

    https://i0.wp.com/user-images.githubusercontent.com/8298818/151826748-d3401e37-3b7f-45df-9d02-a1bbfea4c32d.gif?ssl=1


    July 2021: This is a problem not just for regular source code, but issues and discussions as well.

    This is requested since 2016 in this thread:

    Not all disscussions on github are in English and some like Persian, Hebrew or Arabic are written from right to left.
    It would be easy to add a checkmark to the editor to switch the direction from LTR to RTL and then represent that piece of text in UI from right to left.

    This would dramatically improve the usability and enhance UX.

    This is watched by GitHub in github/feedback discussion 2894, but not yet supported.


    Nov. 2021: this is available for markdown documents:

    Right-to-left language support

    Right-to-left languages are now supported natively in

    • Markdown files,
    • issues,
    • pull requests,
    • discussions, and
    • comments.

    Mixed RTL and LTR languages -- https://i1.wp.com/user-images.githubusercontent.com/3369400/140957639-7bf86607-878d-42bf-a791-4a5c5f680310.png?w=893&ssl=1

    So... not any file, but that is a progress.