Tips & Tricks - Languages Written from Right to Left

This post shows how to configure a portal to support languages written from right to left.

If you use languages with different writing directions in a portal, the titles of elements in applications should be placed above the elements. Of course, you can also simply use two layouts—one for each writing direction. It is also possible to customize Velocity files using your own language-specific CSS styles. These Velocity files are located in the portal directory "/internal/system/vm/custom". The files are included in a specific section of the page each time a page is loaded.

CSS Rules

In CSS, there is a text property called "rtl" (right to left) that can be set to specify a right-to-left writing direction.

            direction: rtl;
        

This rule can be assigned to the universal selector.

            * {
direction:rtl;
}

        

The rule can also be used with a pseudo-class for the language.

            *:lang(he) {
direction:rtl;
}

        

You can find detailed information on this here.

Implementation

Open the portal layout in the "Design" module.

On the left, you'll find the " Layout" section. In this example, a rule is applied to the top-level element—the enclosing container —in the structure. To do this, select the surrounding container in the structure.

In the right-hand pane, switch to " Styles " and click on " " at the top of the column.

Change the value of the `direction` property of the surrounding container to "rtl". Publish the layout. Then refresh the portal in your browser.

The writing direction has now been changed. Input fields also start with input from the right.

Please note that these instructions will only work correctly with the appropriate fonts for languages written from right to left.