Learn how to say "no" to ugly apps with the new R1'18 Telerik release. Sign up for the webinar!

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">
        <link href="styles.css" rel="stylesheet" type="text/css" />
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <telerik:RadAjaxManager ID="ajaxManager" runat="server">
                    <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel1">
                            <telerik:AjaxUpdatedControl ControlID="RadNotification1" />
            <ul class="langUl">
                    <asp:ImageButton ID="dBtn" runat="server" ImageUrl="images/flagDe.png" CommandArgument="de"
                                     OnCommand="SetLanguage" />
                    <asp:ImageButton ID="fBtn" runat="server" ImageUrl="images/flagFr.png" CommandArgument="fr"
                                     OnCommand="SetLanguage" />
                <li style="margin-right: 0;">
                    <asp:ImageButton ID="eBtn" runat="server" ImageUrl="images/flagGb.png" CommandArgument="en"
                                     OnCommand="SetLanguage" />
            <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">
                        <telerik:RadMenuItem Text="Sample item 1">
                        <telerik:RadMenuItem Text="Sample item 2">
                        <telerik:RadMenuItem Text="Sample item 3">

Find Assistance

Help Us Improve

Was this example helpful?