WordPress.org

Forums

Simple Facebook Connect
[resolved] Translation doesn't work for me (4 posts)

  1. franckv
    Member
    Posted 3 years ago #

    Hi,

    did someone managed to have the translation work?
    I put my file sfc-fr_FR.mo under the plugin's root directory but cannot get the messages in French even if the locale is correctly set to fr_FR (sfc-base.php:65)

    I tried with several files generated from poedit and msgfmt and even a file from an Italian translation (http://wordpress.altervista.org/traduzione-in-italiano-di-simple-facebook-connect-versione-0-25/) without success.

    Any idea?
    Thanks!

    Franck

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    WordPress.org Tech Guy
    Plugin Author

    Posted 3 years ago #

    Translation files made for older pre-1.0 versions of the plugin probably won't work anymore. A *lot* changed in 1.0 and 1.1. You'll probably need to make new translations for it.

    I went ahead and made a new POT file for version 1.1 here:
    http://plugins.svn.wordpress.org/simple-facebook-connect/tags/1.1/sfc.pot

    You should be able to use this with a POMO editor tool of your choice to create the proper PO and MO files for it.

  3. franckv
    Member
    Posted 3 years ago #

    Thanks Otto,

    I think I found the issue. It seems the function load_plugin_textdomain() is called too soon (see also http://4visions.nl/en/2010/09/why-load_plugin_textdomain-would-not-work/)

    I've changed the line in sfc-base.php
    from
    load_plugin_textdomain('sfc', false, dirname(plugin_basename(__FILE__)) );

    to
    function my_plugin_init() {
    load_plugin_textdomain('sfc', false, dirname(plugin_basename(__FILE__)) );
    }
    add_action('init','my_plugin_init');

    and it works.
    My knowledge of wordpress is very limited so I don't know if it's the correct file or correct place to put this code!

    Franck

  4. Samuel Wood (Otto)
    WordPress.org Tech Guy
    Plugin Author

    Posted 3 years ago #

    Hmm.. Okay, I'll fix that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic