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

Are there some bugs in localization and cursoring?

3 Answers 72 Views
PdfViewer and PdfViewerNavigator
This is a migrated thread and some comments may be shown as answers.
SarperSozen
Top achievements
Rank 1
SarperSozen asked on 28 Nov 2015, 08:50 PM

Hello I am examining PDFViwer PdfViewerNavigator controls. But in both of two, something is gone wrong.

Firstly, in RadPdfViewer cursor property only allows "WaitCursor". When I try to change as "Default", it is not allowed.

Secondly, in RadPdfViewerNavigator localization is not allowed. I override like this:

01.public class PdfViewerLocalization : PdfViewerLocalizationProvider
02.{
03.    public override string GetLocalizedString(string id)
04.    {
05.        switch (id)
06.        {
07.            case PdfViewerStringId.NavigatorOpenButton: return "Aç";
08.            case PdfViewerStringId.NavigatorPrintButton: return "Yazdır";
09.            case PdfViewerStringId.NavigatorPreviousPageButton: return "Önceki";
10.            case PdfViewerStringId.NavigatorNextPageButton: return "Sonraki";
11.            case PdfViewerStringId.NavigatorCurrentPageTextBox: return "Şimdiki";
12.        }
13.            return base.GetLocalizedString(id);
14.    }

 15. }

But when I execute, It is same. English is not changing.

Could you help me for this situations?

Kind regards.

3 Answers, 1 is accepted

Sort by
0
SarperSozen
Top achievements
Rank 1
answered on 28 Nov 2015, 09:42 PM

I want to edit but there is no option for this. It must be good if this option add. In the first situation, UseWaitCursor is dominating Cursor. So UseWaitCursor option must be set false.

But second situation is still vaguefor me.

0
Accepted
Hristo
Telerik team
answered on 01 Dec 2015, 02:02 PM
Hello Mehmet,

Thank you for writing.

There are no known issues considering the cursors in RadPdfViewer and the localization besides this one: feedback item. The type of the displayed cursor is defined by the value of the Mode property of the RadPdfViewerElement, the allowed states are as follow: None, Pan, TextSelection. 

Considering the localization of the strings please make sure that you have set the PdfViewerLocalizationProvider.CurrentProvider to your instance: Localization. Please check my code snippet below:
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
 
        this.radPdfViewer1.LoadDocument(@"..\..\sample.pdf");
        PdfViewerLocalizationProvider.CurrentProvider = new MyLocalizationProvider();
    }
 
    private void radButton1_Click(object sender, EventArgs e)
    {
        this.radPdfViewer1.PdfViewerElement.Mode = Telerik.WinControls.UI.FixedDocumentViewerMode.None;
    }
}
 
public class MyLocalizationProvider : PdfViewerLocalizationProvider
{
    public override string GetLocalizedString(string id)
    {
        switch (id)
        {
            case PdfViewerStringId.NavigatorOpenButton:
                return "Aç";
            case PdfViewerStringId.NavigatorPrintButton:
                return "Yazdır";
 
            case PdfViewerStringId.NavigatorPreviousPageButton:
                return "Önceki";
            case PdfViewerStringId.NavigatorNextPageButton:
                return "Sonraki";
            case PdfViewerStringId.NavigatorCurrentPageTextBox:
                return "Şimdiki";
        }
 
        return base.GetLocalizedString(id);
    }
}

I am also sending you a gif file showing the result on my end.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
SarperSozen
Top achievements
Rank 1
answered on 01 Dec 2015, 08:21 PM

Hi Hristo,

Thank you for your interest and support. I forgot to get instance in constructer method.

Kind regards,

Mehmet.

Tags
PdfViewer and PdfViewerNavigator
Asked by
SarperSozen
Top achievements
Rank 1
Answers by
SarperSozen
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or