title | description | type | page_title | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
Change Localization of the FindDialog of PdfViewer During Runtime |
How to change the language of the find dialog of RadPdfViewer at runtime. |
how-to |
Dynamically Update the Culture of the FindDialog of RadPdfViewer |
kb-pdfviewer-change-localization-at-runtime |
0 |
PdfViewer, FindDialog, localization, runtime |
1619188 |
kb |
Product Version | 2023.2.718 |
Product | RadPdfViewer for WPF |
How to change the culture of the [find dialog]({%slug radpdfviewer-find-dialog%}) of RadPdfViewer at runtime, thus changing the language.
To change the localization settings of the find dialog, you will need to unregiser it in order to unload it. Then set the application culture and, register the dialog again.
{{region kb-changelocalization-at-runtime}} private void Button_Click(object sender, RoutedEventArgs e) { RadPdfViewerAttachedComponents.SetRegisterFindDialog(pdfViewer, false); Thread.CurrentThread.CurrentCulture = new CultureInfo("de"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("de"); RadPdfViewerAttachedComponents.SetRegisterFindDialog(pdfViewer, true); } {{endregion}}