localise ok and cancel button

7 posts, 0 answers
  1. beeta one
    beeta one avatar
    63 posts
    Member since:
    Aug 2012

    Posted 17 Jan 2013 Link to this post

    How to localize the ok and cancel button in radconfirm? 
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jan 2013 Link to this post

    Hi,

    Try the following code snippet to achieve your scenario.

    ASPX:
    <telerik:RadWindowManager ID="RadWindowManager1" EnableShadow="true" runat="server"  Localization-OK="confirm" Localization-Cancel="don't confirm">
    </telerik:RadWindowManager>

    Regards,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. AJ
    AJ avatar
    33 posts
    Member since:
    Jun 2011

    Posted 13 Feb 2013 Link to this post

    I don't know when this has started happening, but while going through our site I noticed that the confirmation & cancel buttons have a "#" as the text and then #LOC[OK]## and ##LOC[Cancel]## off to the right. At first I was trying to figure things out on my end, but when I couldn't figure it out I went to the demos and noticed that it had the same exact issue. Despite having a RadWindowManager on the page with the following configuration, I still get the same oddity:

    <telerik:RadWindowManager ShowContentDuringLoad="false" EnableShadow="true" ID="rwmPurchaseOrders"
        Width="425px" Height="350px" runat="server" Modal="true" VisibleStatusbar="false"
        Behaviors="Close" DestroyOnClose="true">
        <Localization OK="Confirm" Cancel="Don't Confirm" Yes="Yes" No="No"></Localization>
    </telerik:RadWindowManager>

    Any ideas?
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 14 Feb 2013 Link to this post

    Hello AJ,

    The sharp sign and the strings you noticed are what is internally used for localization. These strings are replaced with the final localized string for the corresponding resource, e.g. in your code ##LOC[Cancel]## will be replaced with Don't Confirm. You can also see them in the templates of the dialogs here.

    The demos and your code snippet, however, seem to work fine on my end - you can find attached two screenshots. Can you confirm that there isn't some JavaScript error on your actual page where the custom locaization didn't work? Does this issue manifest only under certain browsers with you? Especially if so - does clearing their cache, disabling plugins and resetting their settings help? If not - can you post here the minimal markup that shows the problem on your end so we can investigate this?

    In the meantime you can try the following options:
    - use global resources (see this help article)
    - try the JS override from this KB article
    - change the templates to hardcode the desired strings. You can find the defaults here.


    Greetings,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. AJ
    AJ avatar
    33 posts
    Member since:
    Jun 2011

    Posted 14 Feb 2013 Link to this post

    This is especially odd, as it seems to be limited to only Chrome and when I'm in Incognito mode it works just fine. So, it seems as though one (or more?) of my extensions are causing this to happen. I've never seen this happen before, so I guess I'll just need to go through all my extensions and figure it out. Any ideas?
  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 15 Feb 2013 Link to this post

    Hello AJ,

    Some extensions/plugins meddle with the page and can, therefore, cause problems. We recently had a case on one machine where Evernote caused JavaScript errors when google was opened. That was in IE, but the principle is  the same. If the extension crawls or modified (e.g. adds a script) to the page it can break it. I cannot say the reason on your end is the same, but it could be similar.


    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. AJ
    AJ avatar
    33 posts
    Member since:
    Jun 2011

    Posted 15 Feb 2013 Link to this post

    The HootSuite extension is what was causing the errors. Thank you for your help and I apologize for the false alarms.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017