`Viewer` component allows us to use a different language. The right-to-left (RTL) languages such as Arabic, Farsi, Hebrew, Pashto, Persian, Sindhi, Urdu, etc., require the user interface to be displayed in the same direction.`Viewer` and other components provided by other plugins such as the default layout, toolbar plugins support RTL languages.
All you need to do is to set the `direction` option as following:import { TextDirection } from '@react-pdf-viewer/core';<Viewertheme={{direction: TextDirection.RightToLeft,}}/>;
`direction` option:| Value | Description | From |
|---|---|---|
`TextDirection.LeftToRight` | Left to right (LTR) direction. It's the default value | 2.8.0 |
`TextDirection.RightToLeft` | Right to left (RTL) direction | 2.8.0 |