Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>

[[ 🗃 ^yEzqv rel4tion-wiki ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/yEzqv

SSH: git clone USERNAME@vervis.peers.community:yEzqv

Branches

Tags

master :: editing / help /

rtl-text-direction.mdwn

In order to make a wiki page or a part of it align to the right, wrap the text inside the [[templates/rtl]] [[ikiwiki/directive/template]]. You may include anything you wish inside it - Markdown, polls, progress bars and so on - it will work well most of the time. I haven’t tested edge cases, but I created a test page which demonstrates several ikiwiki features used in RTL: [[test page|test]].

If you find anything which doesn’t align to the right correctly, it can be fixed in the [[editing/CSS]].

Example:

\[[!template id=rtl text="""

This text will align to the right.

"""]]

And here’s a simple example of it in action. The test page mentioned above is a much larger example. As you can see, it’s useful not just for RTL languages :-)

Imagine there’s no heaven,

[[!template id=rtl text=""" It’s easy if you try. """]]

No hell below us,

[[!template id=rtl text=""" Above us only sky. """]]

If you want to have RTL text support in your terminal, look [[here|tools/guides/bidi-terminal]].

Implementation Notes

[[TODO|TODO/OPEN]] move this somewhere…

The idea, I believe, is to modify the CSS and the HTML output. Right now I want just the text area - everything else is not related to the Editing section and is less critical.

Text areas also include floating frames (note, popup, etc.) and all kinds of text generated by plugins and directives. I’ll need to make sure everything can be set to have RTL alignment. But again, the page content is the most important part, and other text areas can wait.

The I2P website supports RTL. I already downloaded its source files. I asked about it on IRC, and the log is [[here|rtl-i2p.irc]].

This page can be used to test the results: [[l10n-experiment]].

[See repo JSON]