Skip to content

Support for rendering RTL languages #176

Description

@jowharshamshiri

In order to render RTL languages(see this pull request) correctly we have to add DIVs and SPANs with 'dir' attributes set to 'rtl' inside the mdx files. This leads to inconsistent formatting in a collaborative translation effort.
I think there should be a new 'direction' argument for doc-builder or the direction of the language should otherwise be automatically determined. That info should then be used in the generation of corresponding HTML tags, DIVs and whatnot. If we do that we can dispense with the extra RTL divs and spans everywhere in RTL-language docs.

Here's an example of Persian documentation. I've also attached the files below.
Screenshot from 2022-04-05 15-56-01

The body of the doc has to be surrounded by an RTL DIV. A separate issue not reflected here is that mixing of English characters into Persian, for example in the case of the name of the function 'pipeline()' leads to the name of the function being rendered as '()pipeline' in RTL mode which has to be fixed with an LTR SPAN. Also other features including lists require separate RTL DIVs of their own even if the entire doc itself is surrounded by an RTL DIV. All of these are styling issues that need to be handled automatically and I have very basic knowledge of.

There is probably more issues I haven't encountered yet and handling all of them manually is not the way to go.

fa.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions