This is a migrated thread and some comments may be shown as answers.

ContextMenu Language and Copy of Pictures

3 Answers 92 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
Benedikt asked on 09 Jan 2020, 10:17 AM

Hey,

I am currently implementing a RadPDFViewer in my WPF application.

I managed to change the Tooltip Text of the RadPdfViewerToolBar, but I also want to change the Language of the elemnts in the ContextMenu, because my users are not that well with english.

Is there any hidden way I am missing?

 

Second I have a problem with the copy functionality. It is only possible to copy text. Or at least I find no way to copy the pictures.

 

Greetings

Benedikt

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 13 Jan 2020, 01:16 PM

Hi Benedikt,

You can change the language appearance by adding localization keys in the XAML. You can make this by expanding the code of the toolbar as demonstrated in the Customizing the Default UI help section. Please, check our GitHub example demonstrating how you can localize RadPdfViewer's UI.

We have an item logged in our backlog to provide localization for the RadPdfViewerToolBar: PdfViewer: Provide localization for RadPdfViewerToolBar. You can cast your vote for the implementation as well as subscribe to the task by clicking the Follow button so you can receive updates about status changes.

As for the copying images, currently, the PdfViewer only supports copying of text-only. We have a feature request logged in our backlog to provide support of copying rich-text format and images: Add rich-text format to clipboard on copy. I am sorry to tell you there is no workaround at the moment, but you can cast your vote for the implementation as well as subscribe to the task by clicking the Follow button so you can receive updates about status changes.

Regards,
Martin
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
answered on 14 Jan 2020, 01:33 PM

Hi Martin,

thanks for the links.

With the localization, I have the problem I'm not able to localize the Context-Menu Items.

In the Help for WinForms there are some resource keys for the COntext-Menu. https://docs.telerik.com/devtools/winforms/controls/pdfviewer/localization
These are missing in WPF. So are they not changable there?
The Search-Popup Localization changes with the resx, but not the Contextmenu itself.
I tried around a bit with keys like FixedDocumentViewers_ContextMenu_SelectAll or FixedDocumentViewers_SelectAll, without success.

It's sad, that images aren't able to copy, but well, I have to deal with it.

0
Accepted
Martin
Telerik team
answered on 16 Jan 2020, 03:39 PM

Hello Benedikt,

The documentation about the Localization in WPF can be found in the Localization help article.

In order to achieve the desired functionality, you can create custom implementation of the LocalizationManager following Overriding the LocalizationManager's GetStringOverride() method example:

public class CustomLocalizationManager : LocalizationManager 
{ 
	public override string GetStringOverride(string key) 
	{ 
		switch( key ) 
		{ 
		case "CustomKey": 
			return "Lorem ipsum"; 
		...
		}	
	}
}

, where the key will be the custom implemented LocalizableResourceExtension (currently, the RadPdfViewerToolBar doesn't provide build-in localization keys because this functionality is still not developed):

<telerik:RadButton Content="{telerik:LocalizableResource Key=CustomKey}" Click="..." /> 

I am attaching a sample project demonstrating this functionality.

Regards,
Martin
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
PDFViewer
Asked by
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Martin
Telerik team
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or