Category-wise RTL direction forcing

Hey guys!

I was wondering if there’s a way to force RTL for a specific category so if I have several communities from around the world and each one has it’s own category I’ll be able to let all the RTL languages categories to be RTL forced instead of mixed between RTL and LTR.

My problem is: I can change my settings to display RTL correctly but that doesn’t guarantee that the LTR will look correctly so I need to settle for an RTL content in an LTR environment or the other way around.

This is somewhere between a bug and a feature actually, thanks!

I’d love to explain further if needed.

It’s not possible to do this on a category basis without using a plugin.

You could try enabling the ’ support mixed text direction’ setting. This will set the dir attribute for text on your site based on the direction of the text. This will also let you have mixed text direction within a post. as long as the text is separated by an empty line.

Text that is entered in the composer will default to the direction based of the user’s locale. If their locale is set to an RTL language, text entered in the composer will have a right-to-left direction. This direction can be overridden by clicking the Toggle Direction button that the setting adds to the composer. (This was developed for an Arabic coding site.) Text in the preview window should always appear in the correct direction.

3 Likes

So you’re saying that my only option would be to add some RTL text editing possibilities?

Correct me if I’m wrong, it won’t affect the thread or category appearance, it will only allow me to declare whether a certain phrase is RTL or LTR inside some user contributed content and that’s it.

When the setting is enabled it will automatically set the text direction for cooked post content, topic titles, category names, and the composer’s preview area.

The text in the preview window is set to the direction of the language that is input. The text direction of the composer’s textarea input defaults to the direction of the user’s preferred locale. At the moment, it is only possible to have a single text direction for the composer’s textarea input. To make it easier to add text in the opposite direction, there is a Toggle Direction button. It doesn’t affect the markup, it just makes it easier to type:

I will write a detailed topic about using the setting.

6 Likes

So as I mentioned, only user contributed content, no way to adjust an entire category (RTL inside an LTR system or vice versa).

CSS unicode-bidi:plaintext has the same behavior as dir=auto in HTML, and could allow displaying RTL paragraphs right to left :slight_smile:.

3 Likes