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

Use Different .resx file

2 Answers 37 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 24 Jun 2010, 04:04 PM
Hello,

In this help topic, the scheduler can be localized by creating a global resource file (RadScheduler.Main.resx) and copying it for each language.

Is there a way to tell the scheduler to look at a different (or local) resource file?
The reason for this is that I wish to use the scheduler for several different applications in the same website, each requiring slightly different values in the resx file.

For instance, on one scheduler I want to have the 'ConfirmDeleteText' say 'Are you sure you want to delete this appointment?', but on another I want it to say 'Are you sure you want to delete this availability?'. I tried doing the following:

        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                RadScheduler1.Localization.Show24Hours = "test"
            } 
        } 




It showed the word 'test' in the correct spot, but reverted back to the value in the resource file after an AJAX postback. (Using Q3 2009, .NET 2.0)

Thank you,
Josh

2 Answers, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 30 Jun 2010, 12:47 PM
Hi Josh,

There isn't an easy way to use different resource files for different instances. Your approach however is almost correct - you can set the individual localization strings to override instance specific strings, just do it either on each Page_Load or in the markup.

protected void Page_Load(object sender, EventArgs e)
{
        RadScheduler1.Localization.Show24Hours = "test";
}

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Josh
Top achievements
Rank 1
answered on 08 Jul 2010, 03:20 PM
Tsvetomir, thanks for the reply. For some reason I never got the email. After placing the localization outside of the (!IsPostBack), the change persists.
Tags
Scheduler
Asked by
Josh
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Josh
Top achievements
Rank 1
Share this question
or