RTL language support for Dlang Tour
Alexandru Ermicioi
alexandru.ermicioi at gmail.com
Sun Feb 9 09:49:16 UTC 2020
On Sunday, 9 February 2020 at 07:02:13 UTC, Mir H. S. Quadri
wrote:
> Hi,
>
> I have started the work of translating the tour.dlang.org
> website to Urdu. Languages such as Arabic/Urdu/Farsi/Hebrew are
> written from Right-To-Left (RTL). The problem that I am facing
> is that the content to translate is written in markdown which
> is being rendered into html on the website.
>
> Now in order to translate the content to Urdu, I am having to
> add an extra "<p dir="rtl"></p>" tag for every new paragraph
> which is an inefficient way to do things.
>
> Is there a way that I can add a script that makes the website
> detect if a given language is RTL and automatically render the
> page to RTL?
>
> Also, is there any shortcut in markdown for this that I am
> missing? I did my research and couldn't find any efficient
> solution. Any guidance would be much appreciated.
Hi,
Not sure if markdown has such support in spec itself. However you
may try add unicode rtl mark to rtl text according to
https://en.m.wikipedia.org/wiki/Right-to-left_mark . Browsers
should properly interpret this mark and show text in rtl format
(needs confirmation).
Best regards,
Alexandru.
More information about the Digitalmars-d
mailing list