Localization in UWP Pivot Grid (SfPivotGrid)

10 May 20212 minutes to read

Localization is the key feature for providing software solutions targeted at global users. SfPivotGrid allows users to localize the control to a specific locale and supports “resx” based localization.

You should perform the following steps to localize the control.

  • Translation.
  • Resource file and file name conventions.
  • Culture specification.


The first step in localization is translating the strings that can be localized to the destination locale.


Localization key field should be same for all locales. Do not translate the key fields.

Resource file and file name conventions

After translating the strings, proceed with following steps in the application:

  1. Right-click the project file to create a new folder in the project by selecting Add > New Folder and rename the folder as “Resources”.
  2. Then, right-click the Resources folder to create a new resource file by selecting Add > New Item.




The resource file name should be in the “<Culture Code>.resx” format.

  1. Copy and paste the translated locale to the created resource file.

Culture specification

You should specify the CurrentUICulture in the Application_Startup method of the App.xaml.cs file or in the constructor of the MainPage.xaml.cs file.


If you are specifying the current culture in the constructor of MainPage, then ensure that the culture is specified before calling the InitializeComponent() method.

public sealed partial class MainPage : Page
    public MainPage()
        ApplicationLanguages.PrimaryLanguageOverride = "ar-AE";
Public NotInheritable Partial Class MainPage
	Inherits Page
	Public Sub New()
		ApplicationLanguages.PrimaryLanguageOverride = "ar-AE"
	End Sub
End Class


The SfPivotGrid provides RTL support to display the content from right to left direction by setting the FlowDirection property to RightToLeft.

<syncfusion:SfPivotGrid x:Name="PivotGrid1" FlowDirection="RightToLeft"
						ItemSource="{Binding ProductSalesData}" PivotRows="{Binding PivotRows}"
						PivotColumns="{Binding PivotColumns}" PivotCalculations="{Binding PivotCalculations}"/>
PivotGrid1.FlowDirection = FlowDirection.RightToLeft;
PivotGrid1.FlowDirection = FlowDirection.RightToLeft


A demo sample is available in the following location.

{system drive}:\Users\<User Name>\AppData\Local\Syncfusion\EssentialStudio\<Version Number>\Samples\UWP\SampleBrowser\PivotGrid\PivotGrid\View\Localization.xaml