DataPager - Localization

Current language: en-US

Page size
Page size

Price: 18.00
Quantity: 10 boxes x 20 bags
In Stock: 39
Discontinued: False

Price: 19.00
Quantity: 24 - 12 oz bottles
In Stock: 17
Discontinued: False
Aniseed Syrup

Price: 10.00
Quantity: 12 - 550 ml bottles
In Stock: 13
Discontinued: False
Chef Anton's Cajun Seasoning

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

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

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

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

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

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This demo shows how to localize RadDataPager using global resource files. You need to copy your language file (for instance 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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
    <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">
                    <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>
                        Current language: <strong>
                            <%# (Container.FindControl("RadDataPager1") as RadDataPager).Culture %></strong>
                    <telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1" PageSize="10" Skin="Default">
                            <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                            <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                            <telerik:RadDataPagerTemplatePageField HorizontalPosition="RightFloat">
                    <asp:Panel ID="Panel1" runat="server">
                    <br style="clear: both" />
                    <div class="fsWrapper">
                            <div class="divHeader">
                                <%# Eval("ProductName") %>
                            <div class="divCategory">
                                <%# Eval("CategoryName") %>
                            <br />
                            <div class="divDetails">
                                <%# Eval("UnitPrice") %>
                                <%# Eval("QuantityPerUnit")%>
                                    In Stock:
                                <%# Eval("UnitsInStock")%>
                                <%# Eval("Discontinued")%>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="100%"></telerik:RadAjaxLoadingPanel>
    <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>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?