A right-to-left language (RTL) is written and read from right to left, top to bottom.
Localization for RTL languages requires some planning, as spatial design changes are necessary for RTL translations. For more on this, see DTP and Bidirectional Script Support below.
Smartling supports the translation of the following right-to-left languages:
| Language | Locale ID |
| Arabic (International) | ar |
| Arabic (United Arab Emirates) | ar-AE |
| Arabic (Bahrain) | ar-BH |
| Arabic (Djibouti) | ar-DJ |
| Arabic (Algeria) | ar-DZ |
| Arabic (Egypt) | ar-EG |
| Arabic (Iraq) | ar-IQ |
| Arabic (Jordan) | ar-JO |
| Arabic (Kuwait) | ar-KW |
| Arabic (Lebanon) | ar-LB |
| Arabic (Libya) | ar-LY |
| Arabic (Morocco) | ar-MA |
| Arabic (Oman) | ar-OM |
| Arabic (Qatar) | ar-QA |
| Arabic (Saudi Arabia) | ar-SA |
| Arabic (Sudan) | ar-SD |
| Arabic (Syria) | ar-SY |
| Arabic (Tunisia) | ar-TN |
| Arabic (Yemen) | ar-YE |
| Dari/Persian (Afghanistan) | fa-AF |
| Persian (Iran) | fa-IR |
| Hebrew (he) | he |
| Hebrew | he-IL |
| Hebrew (iw) | iw |
| Kurdish (Sorani) RTL | kd |
| Panjabi-Shahmuki (Pakistan) | pk-PK |
| Pushto; Pashto | ps |
| Uighur; Uyghur | ug |
| Urdu | ur |
| Urdu (India) | ur-IN |
| Urdu (Pakistan) | ur-PK |
| Yiddish | yi |
| Yiddish (United States) | yi-US |
Viewing RTL in Smartling
RTL content is displayed in the Smartling Dashboard and CAT Tool in the same way as with any LTR language, however, the strings are displayed as expected, from right to left.
RTL in the Strings View
RTL in the CAT Tool
You can find RTL and LTR Unicode characters in the special character menu in the CAT Tool.
Visual context for RTL languages
By default, the Context panel of Smartling’s CAT Tool displays a visual representation of the content to translate, as it appears on the source site or in the source file. In most cases, this means that visual context follows a left-to-right layout.
When HTML context is used for translations into RTL languages, Smartling automatically attempts to insert the attribute <html dir="rtl"> into the context file to render the visual context in a right-to-left layout.
The RTL direction attribute is applied to the complete HTML context page as a global attribute, where possible. For smaller context snippets, the RTL direction attribute is inserted into each element of the context file where a successful binding to a string has been established.
Example
Default context view in the CAT Tool for an LTR language:
For RTL languages, the context will be rendered in a right-to-left direction:
Note: The Context panel of the CAT Tool attempts to provide an approximate visual representation of how the translated string(s) appear in the available context. Please ensure that the actual localized page, site, or output file for RTL languages is designed to render its layout in text for RTL languages correctly.
Context files supporting RTL context
Right-to-left visual context is only available for strings mapped to an HTML context file.
This typically includes content ingested with the GDN proxy, context captured with Smartling’s JavaScript Library or Smartling’s Context Capture Google Chrome Extension, as well as many business document file formats.
The ability to influence text rendering direction is specific to HTML. For other types of context files, including image and video context, visual context will always be displayed as it was captured.
Tip: Smartling does not guarantee correct RTL rendering of context in all cases. If your RTL translation team prefers that visual context to be displayed in a left-to-right direction for HTML context, please contact our Support team.
Translated RTL Files
For most source file types, RTL displays translations as expected, however if content is viewed through a web browser, it is important that the page contains a direction attribute dir="rtl", or dir="auto", to ensure correct alignment. If this direction attribute is missing, some browsers may still display the translations as RTL if the language code is in place, e.g.: lang="ar".
| Source File Type | Requirements | Considerations |
| Business Documents | Displays RTL by default | Post-translation production: DTP |
| Resource Files | Displays RTL by default (assuming RTL is supported by the viewing application, e.g. a text editor) |
Post-translation production: DTP |
| HTML | dir attribute: <html dir="auto" or <html dir="rtl" |
When you download a resource file with RTL translations, you may notice discrepancies in how the RTL language displays in Smartling vs a text editor, for example. Text editors such as TextMate, Notepad, may not show text direction properly. Here is an example HTML file you can use as a reference and to check the difference of how the language looks in a browser vs a text editor.
DTP (Desktop Publishing)
Some right-to-left characters may be wider or shorter than left-to-right characters, giving a different visual appearance. For high-touch documents, such as .ppt, .pdf, or InDesign files, post-translation production in the form of DTP should be considered as part of your translation process to ensure the design and layout of the content is of a desired quality.
Bidirectional Script Support
It is important to note that while languages don’t have a direction, scripts do. Most RTL languages such as Arabic and Hebrew are bidirectional scripts, meaning they can contain both right-to-left and left-to-right within the same sentence. For example, if a Hebrew string contained both words and numbers, the words would be RTL and the numbers would be LTR.
Ensure Unicode Bidi (bidirectional script support) is enabled on any computer system where your translated content will live. Bidirectional script support means that both writing scripts with different directions (left-to-right and right-to-left) are supported, and all letters, numbers, formatting characters, special characters, paragraph and heading levels are displayed as expected.