• Hi,

    This is David from the WPML compatibility team.

    We recently had a support request at WPML about your plugin working together with ours:

    https://wpml.org/de/forums/topic/xml-config-fuer-plugin-speed-contact/

    The problem is that options are loaded from the database too early and WPML hasn’t had the chance to hook its filters for translation.

    We could resolve it by change a line in public/class-speed-contact-bar.php line 349, from:

    $this->stored_settings = $this->get_stored_settings();

    to this:

    add_action( 'init', function() {
    	$this->stored_settings = $this->get_stored_settings();
    } );

    I am sharing this here so you can make that change in your plugin and give our shared users a smoother experience.

    Best,
    David

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Martin Stehle

    (@hinjiriyo)

    Thank you very much for your advice. I will test it in the next days and will reply.

    Thread Starter David Garcia Watkins

    (@dgwatkins)

    If you need a developer WPML subscription to test things you can sign up to our Go Global program and we will provide you with one:

    https://wpml.org/documentation/theme-compatibility/go-global-program/

    Thanks!

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    Hello David, I got a developer subscription and installed WPML. I changed the plugin’s code to call the stored setting on 'init'.

    I don’t understand which strings the users want to translate. Those on the plugin’s Settings page? Or / And the plugin’s output on the website (frontend)?

    And both doesn’t work. Fetching the plugin’s string, recognizing its text domain, worked. Creating an untranslated PO file worked. Entering and saving translations on the String Translation page worked. Switching the language worked. But there is no change of the plugin’s language. Instead of that this error raises:

    WordPress database error: [Table ‘wp.wp_icl_string_packages’ doesn’t exist]
    SELECT CONCAT(kind_slug, '-', name) FROM wp_icl_string_packages

    How to go on?

    Thread Starter David Garcia Watkins

    (@dgwatkins)

    I suspect you re-enabled WPML on an old site or something like that.

    I think you will be better off trying this on a fresh WordPress setup to avoid getting caught in un-related problems like this.

    The strings we need to translation are the plugin options strings. The ones that are in the actual bar.

    Let me know how it goes.
    Thanks
    David

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    I installed WPML on a developer site with the latest nightly builds of WP.

    Nevertheless, the code is revised. I will publish the upgrade soon.

    Plugin Contributor Martin Stehle

    (@hinjiriyo)

    Version 6.5.0 is out now. If you’d have any issue with it your message will be appreciated.

    Thread Starter David Garcia Watkins

    (@dgwatkins)

    We tested with the new version and it works fine.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘WPML compatibility’ is closed to new replies.