> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/ui-customization/localization/rtl-language-support.md).

# RTL Language Support

WebViewer now supports RTL (Right-to-Left) languages, providing a seamless experience for users who work in languages such as Arabic and Hebrew.

WebViewer supports Right-to-Left (RTL) viewing and editing for RTL languages, providing a seamless experience for users who work in languages such as Arabic and Hebrew without additional engineering overhead.

Capabilities for RTL include:

* Modular UI RTL layout
* Arabic, Hebrew, Persian, Urdu​ language localization in UI with more languages planned
* Natural Text Selection​
* Improved Copy/Paste​
* Search​
* Both PDF and Office Viewing
* Consistent Page Manipulation

Benefits include:

* RTL users can interact with documents naturally.
* Reduces user frustration.
* Increases product usage and value.
* The correct character order, copy/paste, and search functionality is upheld.
* Text selection and highlighting is accurate.
* Content meaning and context is preserved.
* Eliminates the need for third-party tools and workarounds for developers.

![WebViewer in RTL Mode with Urdu set as the language](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-e65d08169e227ba999890c559409782f51506326%2Fae10b489e7dd851adfd861bc7a8c7952ed219600-3706x1834.png?alt=media)

## How RTL UI Works

When you select a supported RTL language in WebViewer, the entire user interface automatically switches to RTL mode. This switch occurs because WebViewer sets the `dir="rtl"` property on the main UI container whenever the language changes to an RTL language.

In RTL mode:

* The layout of headers, panels, and modals is mirrored horizontally.
* Navigation buttons, icons, and menus appear on the opposite side compared to LTR (Left-to-Right) mode.
* All UI elements, including popups and context menus, follow RTL alignment and flow.

This mirroring ensures that the interface feels natural and intuitive for RTL language users.

## Localized RTL Languages

WebViewer currently supports localization in the WebViewer UI for the following RTL languages:

* Arabic (ar)
* Persian/Farsi (fa)
* Hebrew (he)
* Urdu (ur)

When you choose one of these languages from the language selector in the Settings Menu or set it using the [setLanguage](https://sdk.apryse.com/api/web/UI.html#.setLanguage) API, the UI will automatically switch to RTL mode and the UI will be written in that language.

## FreeText Annotations in RTL

When using FreeText annotations in a RTL language:

* The text input field and rendered annotation will follow RTL direction.
* Cursor movement, text alignment, and punctuation behave as expected for RTL languages.

This ensures that FreeText annotations are fully usable and visually correct for RTL documents.

<figure><img src="https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-140ecce39e4257081035f26e4505b4663946d8bc%2F6f413919a1d6d828f0a3be4ae3ec4de444b9add3-652x454.gif?alt=media" alt="a demonstration of a FreeText annotation in RTL mode." height="300"><figcaption></figcaption></figure>

Some things to note about RTL in FreeText Annotations:

{% hint style="info" %}
**RTL Default Font**

Starting with WebViewer 11.8, the default font for RTL languages is **Noto Sans Arabic**, chosen for its broad support of RTL glyphs.
{% endhint %}

* **Text-Alignment:** For RTL languages, the default text alignment is right-aligned to match typical typing behavior.
* **Font Appearance:** Not all fonts will render identically in FreeText annotations when a document is downloaded and re-opened. Font support for RTL scripts (such as Arabic or Hebrew) also varies between fonts and platforms. Browsers and operating systems use locally installed fonts to render text. If a required RTL-supporting font is not available on the system, the browser will substitute a fallback font, which may affect the appearance and readability of RTL text.
* **Strict Font Matching:** Using [enableStrictAnnotationFontMatching](https://sdk.apryse.com/api/web/Core.html#.enableStrictAnnotationFontMatching) will improve the consistency of FreeText annotation appearance between viewing and downloaded versions.
  * When strict font matching is enabled, a font will be selected that supports all glyphs in the annotation text.
  * For RTL languages, if the selected font does not support the required glyphs, the annotation will fall back to a font that does (ie. Noto Sans Arabic).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/ui-customization/localization/rtl-language-support.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
