How to localize RadSocialShare

17 posts, 0 answers
  1. mathieu emptoz
    mathieu emptoz avatar
    4 posts
    Member since:
    Nov 2009

    Posted 02 Feb 2012 Link to this post

    Hi !

    How can I localize facebook button with the RadSocialShare ?

    <telerik:RadSocialShare runat="server" ID="SocialShare" BorderStyle="None" UrlToShare="xxx" >
      <MainButtons>
        <telerik:RadFacebookButton ButtonType="FacebookLike" />
      </MainButtons>
    </telerik:RadSocialShare>

    It's always in en_US culture !

    Thank's for help :)
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 02 Feb 2012 Link to this post

    Hello mathieu,

     I am glad to inform you that we have implemented localization for RadSocialShare in the just released Beta version of Q1 RadControls. You can find more details along with a working test sample below:

    http://demos.telerik.com/aspnet-ajax-beta/socialshare/examples/localization/defaultcs.aspx

    Let us know in case you have any further questions.

    Regards,
    Svetlina Anati
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mathieu emptoz
    mathieu emptoz avatar
    4 posts
    Member since:
    Nov 2009

    Posted 02 Feb 2012 Link to this post

    Thank you for this fast answer :)
  5. Phanis
    Phanis avatar
    4 posts
    Member since:
    Jun 2012

    Posted 17 Feb 2012 Link to this post

    Hello,

    I need to find RadSocialShare.resx for do a french translation but i don't know where is this location.
    It's not in "F:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q1 2012\App_GlobalResources"

    Can you help me ?
  6. Phanis
    Phanis avatar
    4 posts
    Member since:
    Jun 2012

    Posted 20 Feb 2012 Link to this post

    Sorry,

    just add <globalization culture="fr-FR" uiCulture="fr-FR"/> in <system.web>. It works.
  7. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 23 Mar 2012 Link to this post

    Hello,

    Rad AJAX Version: 2012.1.313.40

    Unfortunately, the Facebook button will not be translated correctly if the current Culture is fr-CH, fr-LU, or other than fr-FR.
    As a request, to have a Culture property in RadSocialShare to set it.

    Best regards,
    Alain
  8. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 26 Mar 2012 Link to this post

    Hi Alain,

    Please examine the following help article: http://www.telerik.com/help/aspnet-ajax/radsocialshare-localization.html and more precisely its second section that treats localizing the standard buttons. What is important is that we cannot control the localization of these buttons and we are limited to what the respective social network provides. The links explain how facebook treat localization and in their own documentation there is an XML file with the available localizations, which currently includes only fr_CA and fr_FR.


    Kind regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 26 Mar 2012 Link to this post

    Hi Marin,

    Thank you for your information.

    What is writing in the localization of the RadocialShare control is "so that the language of the RadSocialShare Styled buttons is automatically switched to the culture and UI culture of the Web page".

    Our request would be to force the RadSocialShare control to use a custom culture, not from the web page, that why our request to have Culture property in RadSocialShare. Like this, if the user culture is fr-CH, fr_LU or fr_BE, we can change it to fr_FR and give it to RadSocialShare. Accordly, button like Facebook will display its texts in French,and we don't need to create localized texts ourself.

    Note: we do this procedure with RadEditor and its Language property, we put fr-FR to use built in localized texts when the culture is "derived" from French, like fr_BE, fr_CH, and so on.

    Best regards,
    Alain
  10. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 28 Mar 2012 Link to this post

    Hello Alain,

    I understand your point, however this is an omission from Facebook and is something that is subject to change on their part without notice. They may start supporting additional locales tomorrow, after a year or never. We are not in a position to fix problems that originate from their handling of localization. Google, for example, only search for the language and fr_FR works just like fr_BE. This is a design pattern they have chosen and we are following their lead. You can create your own button and localize it according to your needs, then add it right next to the RadSocialShare and remove the RadSocialShare border to make the look more uniform.


    All the best,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  11. Dan
    Dan avatar
    40 posts
    Member since:
    Mar 2009

    Posted 29 Mar 2012 Link to this post

    Hi Marin,

    I was wondering if you know a way around this problem.  I need to set the culture for my site to ar-EG using a <globalization> tag in my web.config like this:

            <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="ar-EG" uiCulture="ar-EG" enableClientBasedCulture="true" />

    I am using RadSocialShare with a Facebook like button.  For example:

     

                FacebookButton = New RadFacebookButton
                FacebookButton.TitleToShare = "Facebook Like"
                FacebookButton.ButtonType = FacebookNetType.FacebookLike
                FacebookButton.ButtonLayout = FacebookButtonLayout.ButtonCount
                RadSocialShare1.MainButtons.Add(FacebookButton)

    When I use the ar-EG culture the Facebook button just disappears.  I see in the Facebook documentation that they are not using a standard culture for arabic (or spanish, which will be another problem for me).

    Do you have any ideas on this?

    Thanks.
    Dan

  12. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 30 Mar 2012 Link to this post

    Hi Dan,

    It is exactly the same problem that we have, Facebook doesn't have an entry for the culture ar-GE, only ar-AR, see the XML file link given by Marin. Accordly, the button by Facebook is not displayed.

    That why we requested to have a Culture property to force the Culture used by RadSocialShare.

    Note: We put a new request in the Issue tracker yesterday, but this request is still not listed in the tracker.

    Best regards,
    Alain

  13. Dan
    Dan avatar
    40 posts
    Member since:
    Mar 2009

    Posted 30 Mar 2012 Link to this post

    Hi Alain and Marin,

    I have tried setting my globalization value to other standard cultures (i.e. de-DE, ru-RU, ja-JP) and the Facebook button displays fine.  The code for the social share control must be generating the iFrame correctly based on the current culture of the website in those cases. 

    Couldn't the code be changed to recognize these "non-standard" cultures and generate the correct code?  For example, if it finds ar-EG or ar-GE then use ar_AR for the iFrame.  If it sees fr-xx then use fr_FR, or es-xx then es_LA.  Then there might not even be a need for a culture property on the control.

    Just a thought ...
    Dan
  14. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 02 Apr 2012 Link to this post

    Hi Dan

    If I understand you correctly, it means that RadSocialShare must know which cultures are not defined for every social button. In the case of the culture provided by the website doesn't exist for a social button, it must fall back to its "main" culture.

    It is interesting but I believe more complicated than our Culture property.

    We added a request in the PITS (Issue tracker) for our Culture property. if you find it interesting, please vote for it:
    http://www.telerik.com/support/pits.aspx#/details/Issue=10554

    Best regards,
    Alain
     
  15. Dan
    Dan avatar
    40 posts
    Member since:
    Mar 2009

    Posted 02 Apr 2012 Link to this post

    Hi Alain,

    Yes, your description is accurate.

    I'm thinking that with your Culture property, you are going to have to determine if the culture that you want to use is supported by the Standard buttons or not.  If it's not (like fr-CA) you are going to have to pass in the "main" culture (fr_FR).

    I think the difference is that my option puts the owness on the control to handle the exceptions rather than on the developer using the control.  Anyone not finding this thread may run into the same problems and not understand the purpose of the Culture property.

    Bottom line is that it needs to be fixed somehow.  I have voted for your PITS issue. :-)

    Thanks.
    Dan
  16. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 03 Apr 2012 Link to this post

    Hello guys,

    The PITS item is live and you can vote for it if you need it, but I'd like to point out several important factors:

    1. We are not in a position to check if certain localization is supported by the social network. It is subject to change on their part and is actually a problem with their rendering (e.g. that the facebook button does not render at all instead of falling back to a default language code).

    The above has the following implications
    - we cannot force them to render their button in a culture they do not support
    - we cannot determine if they support the culture, as there isn't an exception thrown
    - we cannot control the rendering of the standard buttons at all, it depends on scripts from the network

    2. There are other big tasks already set with high priority for the Q2 release (see here for details), so I cannot confirm if this feature will be implemented for it. Even if it is (i.e. it accumulates enough votes) it will require the developer to make the choice whether to override the culture of the page with this property (see the points above) and will not fall back automatically.


    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  17. Alain
    Alain avatar
    33 posts
    Member since:
    Feb 2009

    Posted 03 Apr 2012 Link to this post

    Hi Marin,

    I totally agree with your point 1. Our Culture property is just an overwrite of the Culture and CultureUI of the web page for the RadSocialShare. We don't ask Telerik to do one of the items you mentioned in point 1.

    For point 2, we are surprized about the big big effort that our Culture property can give to your developpers to implement it, maybe because of your items of point 1 that we don't request.

    The goal of the Culture property is to give the developer the possibility to choose himself the culture of all social buttons. If one social button doesn't provide the corresponding language from the Culture property, it will be the same behaviour that currently. By example, the Facebook button doesn't display if the culture isn't in its list of accepted cultures.

    Best regards,
    Alain



  18. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 05 Apr 2012 Link to this post

    Hi Alain,

    I understand your point, yet we must consider the future implications of such a property - what is going to be expected from it, for starters. While you would be content with the functionality you describe other clients may want the extensions I talked about in my previous post. This is the reason why the PITS exists - so we can gather feedback and provide (if possible) what our customers want. I believe that this property will be implemented to just set the culture without further checks, and I hope that it will be done for Q2 2012, I simply cannot guarantee this. Please monitor the release notes or the PITS item to see when it is available.


    Greetings,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017