Skip Navigation

Resolved

Overview of the issue

Some strings are not being translated because Easy Property Listings plugin is asking for translations too early, before WPML has had the chance to completely initialize itself.

Workaround

As a temporary workaround you can edit the main plugin file easy-property-listings.php and change the last line from:

EPL();

to:

add_action( 'plugins_loaded', 'EPL', 12 );

6 Responses to “Easy Property Listings - Some strings aren't translated”

  1. Can you revert the above change and let us know if this works instead.

    Same file

    LINE 74 change

    self::$instance->load_textdomain();

    TO

    add_action( ‘plugins_loaded’, array( self::$instance, ‘load_textdomain’ ) );

    • Unfortunately that doesn’t work for strings stored in the wp_options table.
      I will contact you by email to find a definite solution for this.

  2. Dear Sirs.,

    I have the same problems here, I can translate all but not the words on the Easy Property Listings.

    I did not tried your solutions as on the line 74 I have a different content.

    Please let me know how to solve this issue.

    Looking forward your reply.

    My best regards,

    Leandro

  3. Hi WPML team,

    Our code is similar to Easy Digital Downloads and noticed that our self::$instance->includes(); which loads the options and other functions happened before the

    add_action( ‘plugins_loaded’, array( self::$instance, ‘load_textdomain’ ) );

    Just updated the main plugin file here
    https://github.com/easypropertylistings/Easy-Property-Listings

    Specifically
    https://github.com/easypropertylistings/Easy-Property-Listings/blob/master/easy-property-listings.php

    Moved
    self::$instance->includes();

    to trigger after
    add_action( ‘plugins_loaded’, array( self::$instance, ‘load_textdomain’ ) );

    Can you let me know if that works with WPML?

    • Hello Merv,

      WPML also hooks to `plugins_loaded` to set its state and some hooks (and calls `wpml_loaded` when is ready to be used).

      As long as you don’t try to use WPML directly (e.g. by using the global `$sitepress` variable), your plugin should work fine.

      For instance, if you hook any function to a WPML action or filter loading WPML, that should not be a problem.

      The best way to handle this would be to get in touch with out compatibility team (with which I know you had some interaction in the past), so, together, we can make sure there are no side effect in your changes, as well as checking the general compatibility of each other’s products.