How to set proper text direction for right-to-left languages
Problem:
By default, each newly created signature supports left-to-right text direction. You would like to be able to use it with right-to-left languages like Arabic or Hebrew instead.
Solution:
If you want to ensure proper text direction (right-to-left) in your signature, you will have to modify its HTML code a little bit. Here’s how to do it:
- Go to the signature management app and choose the signature which you want to modify.
- Open the signature for editing by going to the Design tab and clicking Edit signature.
- Once the editor opens, click the HTML source button on the ribbon (Fig. 1.).
Fig. 1. Accessing signature’s source HTML code view.
- In the HTML source code view window, locate your text in Arabic, Hebrew, etc. It will be preceded by an opening tag (for example <p>, <td> or <span>) and followed by a closing tag (for example </p>, </td> or </span>).
Info
The HTML language, which is used to create email signatures, is based on tag pairs. Almost every element that is displayed in your signature resides in a container which begins with an opening tag and ends with a closing tag (same as the opening tag but with the '/' slash sign).
- Now, add dir="rtl" to the opening tag of your misaligned text, as shown in Fig. 2. It needs to be placed before the end of the opening tag (>).
Fig. 2. In this example, you need to add dir="rtl" to the opening <span> tag.
- If your signature contains more texts in Arabic, Hebrew, etc., repeat steps 4-5 for all of them. If placeholders like {Title} are going to be replaced with a text in a right-to-left language, you will need to add dir="rtl" to each placeholder’s opening tag as well.
- Once you’ve finished, click Apply & Close to close the HTML source code view window.
- Finally, close the editor by clicking Apply & Close and save your rule in the signature management app.
Now, your text(s) in Arabic, Hebrew, etc. should no longer be misaligned, but should run in the correct right-to-left direction.
Related products: | CodeTwo Email Signatures for Office 365 1.x |
Categories: | How-To |
Last modified: | January 2, 2023 |
Created: | January 21, 2022 |
ID: | 972 |