SocialShare

Controls

All Controls

SocialShare

Rate this demo

Thank you for your post!
Submit a support ticket
If you have an active license or trial, you have access to dedicated support from Telerik’s developers. Response time is 24h for active licenses and 72h for trials, Mon-Fri.
Post in the forums
If you don’t have access to support or would like to help other people by sharing your problem, reach out to our active community in the forums.

SocialShare - Localization

Localization

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.

C# VB
Show code in new window Demo isolation steps
<%@ Page Language="c#" AutoEventWireup="true" Inherits="Telerik.Web.Examples.SocialShare.Localization.DefaultCS"CodeFile="DefaultCS.aspx.cs"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
    <title>ASP.NET SocialShare Demo - Localization</title>
    <style type="text/css">
        .sshListItem
        {
            margin: 2px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
    <qsf:ConfiguratorPanel ID="ConfiguratorPanel1" runat="server" Title="Configuration"
        Orientation="Horizontal" Expanded="true">
        <div style="margin-bottom: 10px; margin-left: 20px;">
            <strong>Choose language:</strong></div>
        <asp:RadioButtonList ID="rblLanguages" runat="server" RepeatDirection="Horizontal"
            AutoPostBack="True" Style="margin-left: 40px;">
            <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:ConfiguratorPanel>
    <telerik:RadSocialShare 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="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>
    </form>
</body>
</html>