Integrating Telerik UI controls with custom db resource provider - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Integrating Telerik UI controls with custom db resource provider

  • Integrating Telerik UI controls with custom db resource provider
  • As part of Globalization, we are using a custom db resource provider to fetch all resources. The resource keys and the values of the Telerik UI controls are in .resx files.

    We want to have the Telerik UI control resources still be retrieved from .resx files, while the resources related to our application should be retrieved from the database. We made the following change in the web.config file:

    <globalization resourceProviderFactoryType="Our.DbResourceProvider">

    The moment we add the above line, all request to the resources are directed to the database and the Telerik related resources are not found in the database. Hence we get resource not found error.

    Please advise how to override the above configuration setting so that Telerik UI controls always retrieves the resources from the .resx files.

  • Hello Mohan,

    First of all, can you tell us whether your request is related to Sitefinity or just for a regular ASP.NET application where you are using the Rad Controls, because there is a difference between the two applications.

    If you are using Sitefinity there can be only one resource provider has to be used at a time. This means that you either have to use the Sitefinity way for handling resource localization or create your custom provider which wraps the Sitefinity one so that you can implement also the ASP.NET approach. I think that the first option will be easier. We do have UI interface for importing translations of localized resources from CSV files and API for importing them through code. Let me try to give you some guidance on how this can be achieved. The thing is that if you want to use the default ASP.NET resource provider you have change all markup of control templates of Sitefinity, classes and JavaScript which utilizes our resource provider - this is used everywhere.

    Here is a quick example:

    1) Lets say that you create a user control Breadcrumb.ascx and create a resource class for it Breadcrumb.resx. You need to add the resx file in ~/App_Data/Sitefinity/GlobalResources folder.

    2) Now the Sitefinity resource loader will work as the built in ASP.NET Global Resource provider and will read the resource classes.

    All the best,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Does this mean that it's not possible to use a Database Resource Provider for application-specific resources without also extending or overriding the existing LocalizationResources web service?