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

Localization

Current language: en-US

Page size
Page size
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
Carnarvon Tigers
Seafood

Price: 62.50
Quantity: 16 kg pkg.
In Stock: 42
Discontinued: False
Teatime Chocolate Biscuits
Confections

Price: 9.20
Quantity: 10 boxes x 12 pieces
In Stock: 25
Discontinued: False
Sir Rodney's Marmalade
Confections

Price: 81.00
Quantity: 30 gift boxes
In Stock: 40
Discontinued: False
Sir Rodney's Scones
Confections

Price: 10.00
Quantity: 24 pkgs. x 4 pieces
In Stock: 3
Discontinued: False
Gustaf's Knäckebröd
Grains/Cereals

Price: 21.00
Quantity: 24 - 500 g pkgs.
In Stock: 104
Discontinued: False
Tunnbröd
Grains/Cereals

Price: 9.00
Quantity: 12 - 250 g pkgs.
In Stock: 61
Discontinued: False
NuNuCa Nuß-Nougat-Creme
Confections

Price: 14.00
Quantity: 20 - 450 g glasses
In Stock: 76
Discontinued: False
Gumbär Gummibärchen
Confections

Price: 31.23
Quantity: 100 - 250 g bags
In Stock: 15
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