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

Localization

Current language: en-US

Page size
Page size
Chef Anton's Cajun Seasoning
Condiments

Price: 22.00
Quantity: 48 - 6 oz jars
In Stock: 53
Discontinued: False
Grandma's Boysenberry Spread
Condiments

Price: 25.00
Quantity: 12 - 8 oz jars
In Stock: 120
Discontinued: False
Uncle Bob's Organic Dried Pears
Produce

Price: 30.00
Quantity: 12 - 1 lb pkgs.
In Stock: 15
Discontinued: False
Northwoods Cranberry Sauce
Condiments

Price: 40.00
Quantity: 12 - 12 oz jars
In Stock: 6
Discontinued: False
Ikura
Seafood

Price: 31.00
Quantity: 12 - 200 ml jars
In Stock: 31
Discontinued: False
Queso Cabrales
Dairy Products

Price: 21.00
Quantity: 1 kg pkg.
In Stock: 22
Discontinued: False
Queso Manchego La Pastora
Dairy Products

Price: 38.00
Quantity: 10 - 500 g pkgs.
In Stock: 86
Discontinued: False
Konbu
Seafood

Price: 6.00
Quantity: 2 kg box
In Stock: 24
Discontinued: False
Tofu
Produce

Price: 23.25
Quantity: 40 - 100 g pkgs.
In Stock: 35
Discontinued: False
Genen Shouyu
Condiments

Price: 15.50
Quantity: 24 - 250 ml bottles
In Stock: 39
Discontinued: False

This demo shows how to localize RadDataPager using global resource files. You need to copy your language file (for instance RadDataPager.Main.fr-FR.resx) and RadDataPager.Main.resx file to App_GlobalResouces folder and then set the desired culture via the Culture property.

You can choose the desired language using the country flags in the RadDataPager template. The currently selected culture is displayed below the RadListView.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="c#" Inherits="Telerik.DataPagerExamplesCSharp.Localization.DefaultCS"CodeFile="DefaultCS.aspx.cs"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container" style="max-width: 950px">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="true" ItemPlaceholderID="Panel1"
                Skin="Default" OnItemCommand="RadListView1_ItemCommand">
                <LayoutTemplate>
                    <div class="divButtons">
                        <asp:ImageButton ID="Button1" runat="server" AlternateText="English / USA (en-US)" ImageUrl="images/en-US.gif" CommandName="ChangeLang" CommandArgument="en-US"></asp:ImageButton>
                        <asp:ImageButton ID="Button2" runat="server" AlternateText="French / France (fr-FR)" ImageUrl="images/fr-FR.gif" CommandName="ChangeLang" CommandArgument="fr-FR"></asp:ImageButton>
                        <asp:ImageButton ID="Button3" runat="server" AlternateText="Turkish / Turkey (tr-TR)" ImageUrl="images/tr-TR.gif" CommandName="ChangeLang" CommandArgument="tr-TR"></asp:ImageButton>
                        <asp:ImageButton ID="Button4" runat="server" AlternateText="Polish / Poland (pl-PL)" ImageUrl="images/pl-PL.gif" CommandName="ChangeLang" CommandArgument="pl-PL"></asp:ImageButton>
                        <asp:ImageButton ID="Button5" runat="server" AlternateText="Portuguese / Brazil (pt-BR)" ImageUrl="images/pt-BR.gif" CommandName="ChangeLang" CommandArgument="pt-BR"></asp:ImageButton>
                    </div>
                    <p>
                        Current language: <strong>
                            <%# (Container.FindControl("RadDataPager1") as RadDataPager).Culture %></strong>
                    </p>
                    <telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1" PageSize="10" Skin="Default">
                        <Fields>
                            <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                            <telerik:RadDataPagerPageSizeField></telerik:RadDataPagerPageSizeField>
                            <telerik:RadDataPagerNumericPageSizeField></telerik:RadDataPagerNumericPageSizeField>
                            <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                            <telerik:RadDataPagerTemplatePageField HorizontalPosition="RightFloat">
                                <PagerTemplate>
                                </PagerTemplate>
                            </telerik:RadDataPagerTemplatePageField>
                        </Fields>
                    </telerik:RadDataPager>
                    <asp:Panel ID="Panel1" runat="server">
                    </asp:Panel>
                    <br style="clear: both" />
                </LayoutTemplate>
                <ItemTemplate>
                    <div class="fsWrapper">
                        <fieldset>
                            <div class="divHeader">
                                <%# Eval("ProductName") %>
                            </div>
                            <div class="divCategory">
                                <%# Eval("CategoryName") %>
                            </div>
                            <br />
                            <div class="divDetails">
                                <div>
                                    Price:
                                <%# Eval("UnitPrice") %>
                                </div>
                                <div>
                                    Quantity:
                                <%# Eval("QuantityPerUnit")%>
                                </div>
                                <div>
                                    In Stock:
                                <%# Eval("UnitsInStock")%>
                                </div>
                                <div>
                                    Discontinued:
                                <%# Eval("Discontinued")%>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </ItemTemplate>
            </telerik:RadListView>
        </telerik:RadAjaxPanel>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="100%"></telerik:RadAjaxLoadingPanel>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT [ProductID], [ProductName], [CategoryName], [UnitPrice], [QuantityPerUnit], [UnitsInStock], [Discontinued] FROM [Alphabetical list of products]"></asp:SqlDataSource>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance