Problems Applying Right-to-Left Rendering in WPF PDF Viewer?
Tags: wpf, csharp, dotnet, pdf
Published: 2020-08-13 11:42:16

---
title: Problems Applying Right-to-Left Rendering in WPF PDF Viewer?
published: true
date: 2020-08-13 10:30:15 UTC
tags: wpf, csharp, dotnet, pdf
canonical_url: https://www.syncfusion.com/blogs/post/problems-applying-right-to-left-rendering-in-wpf-pdf-viewer.aspx
cover_image: https://www.syncfusion.com/blogs/wp-content/uploads/2020/08/Problems-Applying-Right-to-Left-Rendering-in-WPF-PDF-Viewer-672x372.jpg
---

If applying internationalization in a WPF PDF viewer a problem for you, then we have a solution to it. The Syncfusion [WPF PDF Viewer](https://www.syncfusion.com/wpf-ui-controls/pdf-viewer) makes it simple to apply internationalization, right-to-left layouts, with easy steps. You can also read, search, select, and copy RTL language contents.

Let’s first see what internationalization is and its importance in the global market. We shall also look into the role of RTL support in the internationalization process of a product. Later, we shall see the procedure to apply RTL rendering to the Syncfusion WPF PDF Viewer.

## Internationalization

Internationalization (also called **i18n** ) is a design process that makes your product adaptable to different cultures and countries in the world. Since the market for many products is global, it is possible that potential customers of your product might have different cultures and use different languages than yours.

Considering the possible international scenarios for your product while handling user input, RTL support will definitely improve the experience of your customers. In this way, developing an internationalized product can differentiate yours from your competitors’ products. It gives your product more benefits in the global market than those that are not world-ready.

Internationalization support in our PDF Viewer for WPF also increases the potential of the products using it, as it offers support for multiple languages and does not require changes in the code to apply them.

## Right-to-left (RTL) functionality

Right-to-left (RTL) functionality is considered an accessibility feature for a product and it plays a major role in the internationalization process. Some languages with a large number of speakers, such as Arabic and Persian, have right-to-left (RTL) writing systems. To address the requirements of RTL language users, it is very important to make the layout of the UI elements able to render in RTL.

It is also necessary for an RTL product to be localized so that the users in the specific region can get the contents that make sense for their culture. The process of translation and adapting to a specific locale is called **localization** (also called **l10n** ).

## Applying right-to-left functionality to WPF PDF Viewer

You can apply RTL functionality for WPF PDF Viewer in a single step by setting the **FlowDirection** property of **PdfViewerControl** to **RightToLeft**. This switches the layout of the PDF Viewer to right to left. It will improve the user experience and accessibility for the users who use RTL languages. It also allows you to search, select, and copy RTL language text. Refer to the following code example to apply the RTL support for WPF PDF Viewer.

```html
<Window
     x:Class="PdfViewerDemo.MainWindow"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Title="PDF Viewer" WindowState="Maximized"
     xmlns:syncfusion="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF">
     <Grid x:Name="HomeGrid">
         <syncfusion:PdfViewerControl x:Name="pdfViewer" FlowDirection="RightToLeft"/>
     </Grid>
 </Window>
```

To provide a completely native look and feel for RTL users, you need to configure the application to the specific RTL language and culture (localization), as mentioned earlier. Our Syncfusion WPF PDF Viewer supports [localization](https://help.syncfusion.com/wpf/pdf-viewer/localization), allowing you to localize all the static text used for the UI elements. All you need is to add the desired language-specific resource file in the application, use the following code sample to localize your application, and configure it to different languages (e.g., ar- AE for Arabic).

```csharp
using System;
using System.Threading;
 
namespace PDFViewerRTL
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        # region Constructor
        public MainWindow()
        {
            Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-AE");
            InitializeComponent();
        }
        # endregion
    }
}
```

![RTL Support in WPF PDF Viewer](https://www.syncfusion.com/blogs/wp-content/uploads/2020/08/RTL-Support-in-WPF-PDF-Viewer.png)Refer to this [UG documentation](https://help.syncfusion.com/wpf/pdf-viewer/localization) for how to create the resource files and add them to your WPF application. You can also find an example WPF PDF Viewer project that is configured to RTL settings in this [GitHub](https://github.com/syncfusion/wpf-demos/tree/master/PDF%20Viewer/RightToLeft/Right%20to%20Left) repository.

## Conclusion

Thank you for reading this blog. I hope that you have enjoyed learning about the importance of internationalization for a product and how easy it is to apply RTL functionality to the [WPF PDF Viewer](https://www.syncfusion.com/wpf-ui-controls/pdf-viewer). Try using our PDF Viewer in your application and share your feedback in the comment section below.

For existing customers, the new version of Essential Studio is available for download from the [License and Downloads](https://www.syncfusion.com/account/downloads) page. If you are not yet a Syncfusion customer, you can try our 30-day [free trial](https://www.syncfusion.com/downloads) to check out our available features. Also, try our samples from this [GitHub](https://github.com/syncfusion) location.

You can also contact us through our [support forum](https://www.syncfusion.com/forums), [Direct-Trac](https://www.syncfusion.com/support/directtrac/incidents), or [feedback portal](https://www.syncfusion.com/feedback/wpf). We are always happy to assist you!