Forum Replies Created

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter rostam24

    (@rostam24)

    Still haven’t been able to get this to working. Can anyone help me out? I’ve been searching and trying a couple of hours a day for the last week…. I’m truly stuck :-/

    Thread Starter rostam24

    (@rostam24)

    OK it turns out that the transposh plugin was messing things up, and I had to change something in my theme. More information can be found here:
    https://trac.transposh.org/ticket/179

    Thread Starter rostam24

    (@rostam24)

    Hmm, on second thought it might not be the title that is the problem, but rather the thumbnail that doesn’t close properly and adds the title to it.

    Thread Starter rostam24

    (@rostam24)

    I got an e-mail from the founder, he adviced me to use tp_language.

    With that, I got this working by adding a hook to functions.php:

    <?php

    add_action( ‘publish_post’, ‘set_transposh_language’,10,2 );

    function set_transposh_language($post_id, $post)
    {

    if (in_category( ‘dutch’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘nl’);

    else if (in_category( ‘japanese’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘dutch’);

    else if (in_category( ‘norwegian’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘no’);

    else if (in_category( ‘finnish’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘fi’);

    else if (in_category( ‘swedish’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘sv’);

    else if (in_category( ‘portugese’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘pt’);

    else if (in_category( ‘french’, $post_id )) update_post_meta($post_id, ‘tp_language’, ‘fr’);

    else update_post_meta($post_id, ‘tp_language’, ‘en’);
    }

    ?>

    I’m really surprised that this worked, because I’m a real newbie when it comes to coding. Anyway, I’m really happy that I got it working.

    A big thank you for the guys at transposh, this plugin is amazing! ??

    Thread Starter rostam24

    (@rostam24)

    Wow, that was a fast reply!

    I am currently taking content from the RSS feed and placing it on my website as a post, with each feed having its own category. I was thinking I might be able to set each category to a different language…. but now that I’m giving it some more though, I guess the language setting I was talking about exists only thanks to the transposh plugin.

    Sorry about that, it seems I should be asking them this question ??

Viewing 5 replies - 16 through 20 (of 20 total)