Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.4 KB

kb-changelocalization-at-runtime.md

File metadata and controls

45 lines (38 loc) · 1.4 KB
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

Environment

Product Version 2023.2.718
Product RadPdfViewer for WPF

Description

How to change the culture of the [find dialog]({%slug radpdfviewer-find-dialog%}) of RadPdfViewer at runtime, thus changing the language.

Solution

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.

[C#]

{{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}}