New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Localization

  • Demo Configurator


RadComboBox provides a mechanism for quick and easy localization, based on the native ASP.NET 2.0 localization. The text message in the show more results box is obtained from the resource files located in the WebSite's App_GlobalResources directory, so that the language of the control can be switched with a single property (Culture).
e.g. <telerik:RadComboBox id="RadComboBox1" runat="server" Culture="en-US" />

Developers can also localize the component for languages, which are not provided with the RadComboBox distribution by modifying the provided resx file.

Additionally, each of the localization strings can be modified at runtime using the Localization property. This saves the need to create a new localization file to change a single string.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="c#" CodeFile="DefaultCS.aspx.cs" AutoEventWireup="false" Inherits=" ComboBox.Examples.Localization.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <telerik:RadProgressManager ID="Radprogressmanager1" runat="server" />

    <div class="demo-container size-thin">
        <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" Height="180" Width="300px" 
            DataSourceID="EntityDataSource1" DataTextField="ContactName" DataValueField="ContactName"
            EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10" ShowMoreResultsBox="true"
            EnableVirtualScrolling="true">
        </telerik:RadComboBox>
    </div>
    <asp:EntityDataSource runat="server" ID="EntityDataSource1" ConnectionString="name=NorthwindReadOnlyEntities"
        DefaultContainerName="NorthwindReadOnlyEntities" EntitySetName="Customers" Select="it.[ContactName]" OrderBy="it.[ContactName]">
    </asp:EntityDataSource>


    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ConfigurationPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />

    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1">
        <Views>
            <qsf:View Title="Choose language">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Narrow">
                    <qsf:RadioButtonList ID="radiobuttonlistLanguages" runat="server" RepeatDirection="Vertical"
                        AutoPostBack="True" Style="margin-left: 1em" OnSelectedIndexChanged="radiobuttonlistLanguages_SelectedIndexChanged">
                        <asp:ListItem Value="de-DE"><img src="images/german.gif" alt="Deutsch" /> Deutsch</asp:ListItem>
                        <asp:ListItem Value="en-US" Selected="true"><img src="images/us.gif" alt="English" /> English</asp:ListItem>
                        <asp:ListItem Value="fr-FR"><img src="images/french.gif" alt="Francais" /> Francais</asp:ListItem>
                    </qsf:RadioButtonList>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>

    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance