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

localise ok and cancel button

6 Answers 108 Views
Window
This is a migrated thread and some comments may be shown as answers.
beeta one
Top achievements
Rank 1
beeta one asked on 17 Jan 2013, 12:32 PM
How to localize the ok and cancel button in radconfirm? 

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Jan 2013, 12:40 PM
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.
0
AJ
Top achievements
Rank 2
answered on 13 Feb 2013, 06:50 PM
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?
0
Marin Bratanov
Telerik team
answered on 14 Feb 2013, 01:30 PM
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.
0
AJ
Top achievements
Rank 2
answered on 14 Feb 2013, 05:20 PM
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?
0
Marin Bratanov
Telerik team
answered on 15 Feb 2013, 08:24 AM
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.
0
AJ
Top achievements
Rank 2
answered on 15 Feb 2013, 07:36 PM
The HootSuite extension is what was causing the errors. Thank you for your help and I apologize for the false alarms.
Tags
Window
Asked by
beeta one
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
AJ
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or