• Resolved sapidou

    (@sapidou)


    Hello,

    I am developping a multi-language website EN/FR.
    I am using transposh and try to translate the text directly on the page with the transposh widget.
    It works perfectly except with the text which appears after clicking on the read more button.
    ( I am using the plugin “Read More Right Here” which allows to see the content after the “read more” tag directly on the same page. )
    I tried also to use the [tp] shortcode in my post like this :
    [tp not_in=”fr”]my text in english[/tp]
    [tp lang=”fr” only]my text in french[/tp]
    It works when I use these shortcodes before the “more” tag but not after.
    I also used the “translate all” button in the settings page but no more success.

    I sent this email directly to transposh.
    I got the following answer :
    This plugin probably loads the “more” data, with ajax, you need to handle this directly with modification of the on_init() function

    But I don’t really know what to do.

    Any help will be most welcomed !

    Thanks in advance.

    Sadou.

    https://www.ads-software.com/plugins/transposh-translation-filter-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sapidou

    (@sapidou)

    Hi again,

    I finally managed to solve the problem following the advice given :
    I updated the on_init() function in transposh.php, adding a special case for my plugin.
    I didn’t used $_POST[“action”] as it contains a null value but another $_POST variable specific to my plugin.

    I would have to make this modification after each new transposh release
    but it works perfectly !

    Thanks again to transposh support !

    Hi Sapidou,

    can you tell what you did? I do not have your luck with Transposh support, I guess Ofer must be busy for the time being.

    My translation revert from French to English each time there’s and Ajax call, and I’m trying to do with $_POST[‘action’] without succes…

    Thanks,
    Paolo

    Thread Starter sapidou

    (@sapidou)

    Yes sure !

    this is what I add in transposh.php

    //readmorereadright plugin
    if ( isset($_POST[‘wt-rmrh-redirect’]) && $_POST[‘wt-rmrh-redirect’] == ‘1’ && isset($_POST[‘itemid’]) ) {
    $this->target_language = transposh_utils::get_language_from_url($_SERVER[‘HTTP_REFERER’], $this->home_url);
    $this->attempt_json = true;
    }

    But make sure you are using the readmorereadright.
    Because the test is made on this plugin variables.

    I hope it will work for you !

    Sapidou

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘no translation with the text after the "read more" button’ is closed to new replies.