RadPageView localization problem

5 posts, 1 answers
  1. Constantinos Petridis
    Constantinos Petridis avatar
    21 posts
    Member since:
    May 2010

    Posted 29 Nov 2010 Link to this post

    I tried to priovide a custom localization provider for RadPageView with no success. 

    Public Class PageViewLocalizationProvider
        Inherits Telerik.WinControls.UI.RadPageViewLocalizationProvider
     
        Public Overrides Function GetLocalizedString(ByVal id As String) As String
            Return SharedLocalizationManager.GetLocalizedString(id)
        End Function
    End Class

    To use the localization provider I did
    Telerik.WinControls.UI.RadPageViewLocalizationProvider.CurrentProvider = New PageViewLocalizationProvider()

    SharedLocalizationManager is just a shared class that provides localization string (a simple select case) for both RadDockLocalizationProvider and RadPageViewLocalizationProvider.

    RadDockLocalizationProvider is working fine but RadPageViewLocalizationProvider is not working at all (the GetLocalizedString function is never called)

    I am using the Q3 2010 dlls (trial version).

    Thank you in advance

  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 30 Nov 2010 Link to this post

    Hello,

    Having looked at the internals of the Telerik assemblies, this seems to be not fully implemented as yet. The GetLocalizedString method currently returns the following for RadPageViewLocalizationProvider

    Public Overrides Function GetLocalizedString(ByVal id As String) As String
        Select Case id
            Case "CloseButton"
                Return "Close Selected Page"
            Case "ItemListButton"
                Return "Available Pages"
            Case "LeftScrollButton"
                Return "Scroll Strip Left"
            Case "RightScrollButton"
                Return "Scroll Strip Right"
            Case "ShowMoreButtonsItemCaption"
                Return "Show More Buttons"
            Case "ShowFewerButtonsItemCaption"
                Return "Show Fewer Buttons"
            Case "AddRemoveButtonsItemCaption"
                Return "Add or Remove Buttons"
            Case "ItemCloseButton"
                Return "Close Page"
            Case "NewItemTooltipText"
                Return "Add New Page"
        End Select
        Return String.Empty
    End Function

    Wheras the RadGridLocalizationProvider returns the following:
    Public Overrides Function GetLocalizedString(ByVal id As String) As String
        Dim name As String = ("RadGridStringId." & id)
        Dim str2 As String = Me.resourceManager.GetString(name)
        If (str2 Is Nothing) Then
            str2 = ""
        End If
        Return str2
    End Function

    As far as I am aware, there are many fixes and changes that will be in the upcoming service pack which is due out mid-December. Perhaps this will be one of them. Hopefully this doesn't put you off using Telerik controls.

    Hoe that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Constantinos Petridis
    Constantinos Petridis avatar
    21 posts
    Member since:
    May 2010

    Posted 30 Nov 2010 Link to this post

    Thanks for the answer :)

    I was under the impression that it was implemented (I've read, in another post, that it should have been available in Q2 2010 release).

    Anyway, our decision to use the Telerik controls (in our application) is already taken (mainly due to the support of Right To Left languages), so It’s a matter of when rather than if ;)


    BTW, I would love to seen RTL support the newly implemented RadCommandBar control, but that’s a post for another forum, CommandBar forum.

  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 30 Nov 2010 Link to this post

    Hello,

    As far as I know, RTL is implemented. But if you'd like to ask in the commandbar forum any questions related to the command bar, I'll do my best to answer them.

    thanks
    Richard
  6. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 01 Dec 2010 Link to this post

    Hello Constantinos,

    Thank you for writing and thank you for pointing out this issue.

    We investigated the problem and found out that the Localization provider for the RadPageView is not working in our latest release. We have added this issue in our Public Issue Tracking System (PITS) and we will address it in one of our future release. Here is a link to the issue in the PITS where you can track the progress of the task.

    I have also updated your Telerik points.

    If you have further questions, I would be glad to assist you.

    Best wishes,
    Ivan Petrov
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
Back to Top
UI for WinForms is Visual Studio 2017 Ready