• Hi guys,

    I am having a problem with the plugin, i believe my posts have the correct div tags, but the translation doesn’t work. The button is displayed, but when you click a country, nothing happens!

    Please help, the site is here: https://www.Review-Hostel.com

    Thanks!

Viewing 15 replies - 1 through 15 (of 32 total)
  • Sorry for the slow reply. You had a different tag on this post so I didn’t see it.

    The theme you’re using called schemermag doesn’t have the right divs for the translate plugin to see.

    The index.php page won’t show the Translate button of course but you can fix the single.php and page.php files. They are both the same.

    From line 9 change:

    	<?php if (have_posts()) : the_post(); ?>
    		<h2><?php the_title(); ?></h2>
    		<div class="content"><?php the_content(); ?></div>
    	<?php else: ?>
    

    to this:

    	<?php if (have_posts()) : the_post(); ?>
    	<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    		<h2><?php the_title(); ?></h2>
    		<div class="content"><?php the_content(); ?></div>
    	</div>
    	<?php else: ?>
    

    You can do this with a text editor or even from the Administration Panel under Appearance > Editor.

    That’s it! Let me know if you have any other questions.

    monodistortion
    I have the same problem as “reviewhostel” but couldn’t solve it with what you just posted. Can you help me? I really need this plugin to work since my blog is bilingual.

    THANKS A LOT IN ADVANCE!

    Forgot to post my blog URL
    https://www.sheche.net

    ??

    Hi Sheche,
    I can see that your theme doesn’t have div’s with the right id’s for the plugin to see. It looks like you’re using a theme called “premium_blogger”. If I can see the code for the theme it’s easier to tell you what to change. Did you download this theme from somewhere?

    Yes, I download it from here:
    https://www.sha.tc/info-tech/wordpress/melayu-boleh-wordpress-theme-2

    I did some minor tweaks but everything is pretty much intact. THANKS FOR YOUR FAST RESPONSE!

    Ok, I looked at the melayu-boleh-theme and it should be pretty straight forward. If you’re familiar with the default (Kubrick) theme it needs a div in The Loop that has the id of each post. You’ll need to edit the files index.php, single.php, and page.php.

    The changes for index.php and single.php are the same. After the while statement but before the div insert one more div like this:

    <?php while (have_posts()) : the_post(); ?>
    
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    
    <div class="box4">
    

    Then that div gets closed before the endwhile statement like this:

    </div>
    <?php endwhile; ?>
    

    The page.php file is almost the same too. Insert a new div after the while statement:

    <?php while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<?php the_ID(); ?>">
    
    <div class="box4">
    

    And then close it before the endwhile statement:

    </div>
    <?php endwhile; ?>
    

    That solves it! THANK YOU SO MUCH FOR YOUR HELP!
    You’re awesome ??

    Sheche,
    I looked at your blog again. It looks like the translation is working ok except for the single.php pages if you click on the title of a blog post. You may have made a mistake editing that file.

    I just saw that, yes…

    Parse error: syntax error, unexpected T_ENDWHILE in …/public_html/wp-content/themes/premium_blogger/single.php on line 44

    This is what’s on line 44

    <?php endwhile; ?>

    I don’t know what the problem is. I did exactly what you said (and I did it twice, to be sure). It worked on the other files… Any advice?

    Hey Mono:

    Me again ?? – translation was working beautifully until I upgraded to the latest plugin – still have the div tags where they are supposed to be – but it doesn’t translate for me again, I click the language and it does nothing. https://www.thenewhustle.net

    Any ideas? thanks for being SO helpful on this forum, means the world.

    G

    Also – it works on my single blog pages, but not on my index page – and the code for both is the same, so weird.

    Im waiting for your response Monodistortion
    Please don’t leave me hanging ??

    Sheche,
    It hard to say exactly what the problem is with your single.php file without seeing it.

    The original melayu-boleh single.php file I have has a while loop from line 7 to 24. It sounds like something you changed messed up that loop. What do you use to edit your php files?

    I can look at your file if you put it on yousendit or somewhere I can see it.

    thenewhustle,

    I don’t see any problem on your site. The front page doesn’t use index.php and I don’t see a page that does.

    Thread Starter reviewhostel

    (@reviewhostel)

    Works great – thankyou!

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Google AJAX Translation – Won’t translate!’ is closed to new replies.