Notification - Localization

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

You can localize RadNotification by setting its TitleMenuToolTip and CloseButtonToolTip properties to the desired values. This easy localization can be done in a few manners—e.g by using resource files or setting and evaluating directly the property.

Click on a flag to localize the tooltips of the title menu and the close button of the notification message according to the chosen country.

  • ContentCS.aspx
    • ContentCS.aspx
    • DefaultCS.aspx
  • ContentCS.aspx.cs
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContentCS.aspx.cs" Inherits="Notification.Examples.Localization.Notification_Examples_Localization_ContentCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="ajaxManager" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadNotification1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <ul class="langUl">
                <li>
                    <asp:ImageButton ID="dBtn" runat="server" ImageUrl="images/flagDe.png" CommandArgument="de"
                                     OnCommand="SetLanguage" />
                </li>
                <li>
                    <asp:ImageButton ID="fBtn" runat="server" ImageUrl="images/flagFr.png" CommandArgument="fr"
                                     OnCommand="SetLanguage" />
                </li>
                <li style="margin-right: 0;">
                    <asp:ImageButton ID="eBtn" runat="server" ImageUrl="images/flagGb.png" CommandArgument="en"
                                     OnCommand="SetLanguage" />
                </li>
            </ul>
            <telerik:RadNotification RenderMode="Lightweight" ID="RadNotification1" runat="server" CloseButtonToolTip="<%# CloseToolTip%>"
                                     Skin="Black" VisibleOnPageLoad="true" ShowTitleMenu="true" TitleMenuToolTip="<%# MenuToolTip %>"
                                     Title="Notification Localization" Text="The tooltips for the close and menu buttons will change when the new language is selected."
                                     Width="300" OffsetX="-30" OffsetY="-30" AutoCloseDelay="0">
                <NotificationMenu>
                    <Items>
                        <telerik:RadMenuItem Text="Sample item 1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Sample item 2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Sample item 3">
                        </telerik:RadMenuItem>
                    </Items>
                </NotificationMenu>
            </telerik:RadNotification>
        </form>
    </body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?