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

Localization

  • Demo Configurator

Choose language:

RadSocialShare provides a mechanism for quick and easy localization, based on the native ASP.NET localization regarding the Stlyed buttons and following best practices regarding third party (Standard) buttons. All UI strings for Styled buttons are obtained from the resource files located in the WebSite's App_GlobalResources directory, so that the language of the RadSocialShare Styled buttons is automatically switched to the culture and UI culture of the Web page. As to third party (Standard) buttons, the script parameters are changed according to their documentation when the culture changes.


The name of the resource file (RadSocialShare in this case) and the string to read must be specified in the corresponding properties for each of the tooltips/label texts for the Styled buttons you wish to localize (in this demo the string name is the name of the social network). Standard third party buttons are localized automatically in the manner they implement.


Each of the localization strings for the Styled buttons can be modified at runtime using the corresponding property. This saves the need to create a new localization file to change a single string.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.SocialShare.Localization.DefaultVB"CodeFile="DefaultVB.aspx.vb"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ 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>
</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 size-wide">
        <telerik:RadSocialShare RenderMode="Lightweight" ID="RadSocialShare1" runat="server">
            <MainButtons>
                <telerik:RadSocialButton SocialNetType="ShareOnFacebook" ToolTip="<%$ Resources:RadSocialShare, Facebook %>"
                    LabelText="<%$ Resources:RadSocialShare, Facebook %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="ShareOnTwitter" ToolTip="<%$ Resources:RadSocialShare, Twitter %>"
                    LabelText="<%$ Resources:RadSocialShare, Twitter %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="ShareOnYammer" ToolTip="<%$ Resources:RadSocialShare, Yammer %>"
                    LabelText="<%$ Resources:RadSocialShare, Yammer %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="ShareOnPinterest" ToolTip="<%$ Resources:RadSocialShare, Pinterest %>"
                    LabelText="<%$ Resources:RadSocialShare, Pinterest %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="Blogger" ToolTip="<%$ Resources:RadSocialShare, Blogger %>"
                    LabelText="<%$ Resources:RadSocialShare, Blogger %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="Delicious" ToolTip="<%$ Resources:RadSocialShare, Delicious%>"
                    LabelText="<%$ Resources:RadSocialShare, Delicious %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="Digg" ToolTip="<%$ Resources:RadSocialShare, Digg %>"
                    LabelText="<%$ Resources:RadSocialShare, Digg %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="GoogleBookmarks" ToolTip="<%$ Resources:RadSocialShare, GoogleBookmarks %>"
                    LabelText="<%$ Resources:RadSocialShare, GoogleBookmarks %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="ShareOnGooglePlus" ToolTip="<%$ Resources:RadSocialShare, GooglePlus %>"
                    LabelText="<%$ Resources:RadSocialShare, GooglePlus %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="LinkedIn" ToolTip="<%$ Resources:RadSocialShare, LinkedIn %>"
                    LabelText="<%$ Resources:RadSocialShare, LinkedIn %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="MySpace" ToolTip="<%$ Resources:RadSocialShare, MySpace %>"
                    LabelText="<%$ Resources:RadSocialShare, MySpace %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="Reddit" ToolTip="<%$ Resources:RadSocialShare, Reddit %>"
                    LabelText="<%$ Resources:RadSocialShare, Reddit %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="StumbleUpon" ToolTip="<%$ Resources:RadSocialShare, StumbleUpon %>"
                    LabelText="<%$ Resources:RadSocialShare, StumbleUpon %>"></telerik:RadSocialButton>
                <telerik:RadSocialButton SocialNetType="Tumblr" ToolTip="<%$ Resources:RadSocialShare, Tumblr %>"
                    LabelText="<%$ Resources:RadSocialShare, Tumblr %>"></telerik:RadSocialButton>
                <telerik:RadTwitterButton CounterMode="Horizontal"></telerik:RadTwitterButton>
                <telerik:RadGoogleButton AnnotationType="Inline" ButtonSize="Medium" Width="200"></telerik:RadGoogleButton>
                <telerik:RadFacebookButton ButtonType="FacebookLike" ButtonLayout="Standard" Width="480"
                    ShowFaces="false"></telerik:RadFacebookButton>
                <telerik:RadFacebookButton ButtonType="FacebookSend"></telerik:RadFacebookButton>
            </MainButtons>
        </telerik:RadSocialShare>
        <telerik:RadCodeBlock ID="b" runat="server">
        </telerik:RadCodeBlock>
    </div>
    <qsf:ConfiguratorPanel runat="server">
        <Views>
            <qsf:View>
                <h4>Choose language:</h4>
                <asp:RadioButtonList ID="rblLanguages" runat="server" AutoPostBack="True">
                    <asp:ListItem Value="de-DE">Deutsch</asp:ListItem>
                    <asp:ListItem Value="en-US" Selected="true">English</asp:ListItem>
                    <asp:ListItem Value="fr-FR">Francais</asp:ListItem>
                </asp:RadioButtonList>
                <input type="hidden" name="cultureRadioList" value="<%= rblLanguages.UniqueID %>" />
            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance