Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Dylan Ryan

    (@irkanu)

    Hey dos81,

    German isn’t currently supported, but I’ll put that in the next release.

    Look out for it in the next release within the next week or so. ??

    Kind regards,

    Dylan

    Plugin Author Dylan Ryan

    (@irkanu)

    Just finished the German translation.

    I’ll be testing this on a local install & pushing an update later this week. ??

    Kind regards,

    Dylan

    Thread Starter dos81

    (@dos81)

    thanks for you effort! ??

    didn’t think you had to translate yourself. had hoped you could somehow implement some kind of “locale” variable/option and get the info from FB themselfes so any language will work. but for me, german is sufficent ??

    if you need something translatedt to german for this, let me know.

    Plugin Author Dylan Ryan

    (@irkanu)

    Hmm, I’m having trouble getting the language to change to german.

    If you are comfortable with GitHub, check this out: https://github.com/irkanu/simple-facebook-page-widget/blob/master/simple-facebook-page-plugin.php#L75

    I’m not 100% confident that function is correct.

    I’ll keep working at this, but until that issue is resolved language translations are on hold.

    Thread Starter dos81

    (@dos81)

    are you sure you have to use the wordpress plugin translation stuff?

    you somewhere include this i think:

    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_EN/sdk.js#xfbml=1&version=v2.3";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    if you just switch the “en_EN”-part of the javascript source to “de_DE” the buttons would be translated directly (or whatever languages i.e. “nl_NL” for netherlands -> https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains)

    edit: its in the pluginroot/js/simple-facebook-page-root.js file in line 12 the “en_US”. i’m not a programmer but maybe something like

    var Language = "en_US";
    if (LanguageVariableThatCanBeDefinedByTheUser!="")
        {Language = LanguageVariableThatCanBeDefinedByTheUser}
    Plugin Author Dylan Ryan

    (@irkanu)

    Hmm. I think I see what you are saying.

    See this image: https://imgur.com/TingDi6

    Let me know if that’s what you mean. ??

    If so, I can totally do that & will probably implement that. ??

    Thread Starter dos81

    (@dos81)

    yeah, thats exatly what i was looking for! ??

    Plugin Author Dylan Ryan

    (@irkanu)

    Perfect!

    I’m glad we’re on the right track.

    I’ll need to localize the javascript – https://codex.www.ads-software.com/Function_Reference/wp_localize_script

    I’m pretty busy at work this week, but I’ll have some free time this weekend to play with it.

    I’ll try to add a setting in the widget & parameter in the shortcode to allow you to choose which language the feed outputs.

    Thread Starter dos81

    (@dos81)

    so no easy “changing the variable in the JS-file” then… ??

    thanks for your efford! take your time. it’s not that important… ??

    Plugin Author Dylan Ryan

    (@irkanu)

    You can definitely edit the JS file to accomplish this, but if you update the plugin you will lost that customization.

    Edit this line:
    js.src = "//connect.facebook.net/en_EN/sdk.js#xfbml=1&version=v2.3";

    Change en_EN to de_DE to replicate the image I sent you.

    That will hold you over until it’s integrated into the plugin. ??

    Plugin Author Dylan Ryan

    (@irkanu)

    I’m back!

    I’ve updated the plugin and added 135 languages – wow! ??

    Don’t forget to update your plugin or download the latest copy from the repository.

    The options page to set your language is under “Settings”

    Let me know how it is & don’t forget to take a few seconds to leave a review, if you feel like I’ve helped. ??

    https://www.ads-software.com/support/view/plugin-reviews/simple-facebook-twitter-widget

    Thread Starter dos81

    (@dos81)

    works great & review submitted ?? thanks for the quick help!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘how to change localization’ is closed to new replies.