• Resolved thenewhustle

    (@thenewhustle)


    I’m trying to install the google ajax translation plugin, I can correctly install and see the link and the corresponding language translations table, but when I click a language nothing happens.

    Not sure what the issue is, I even made sure my footer closed with

    <?php wp_footer(); ?>
    </body>
    </html>

    as I found this resolved some other people’s issues. Any help would be greatly appreciated, see site at thenewhustle.net, very frustrating issue!

    thanks.

Viewing 15 replies - 1 through 15 (of 16 total)
  • It looks like the theme you are using doesn’t have the right html for the plugin to grab. Have you tried it with the default theme (Kubrick)? When you look at the web page source, each post or page needs to be wrapped with a div in the format

    <div id="post-##">
    

    Where ## is the number of the post or page.

    If you’re familiar with editing PHP files you can make the changes yourself. The files index.php, single.php, and page.php would need to be changed. You can look at Kubrick or a recent theme to compare the code but each post needs to be wrapped with a div that looks like:

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    

    That way the plugin knows which block of html to grab onto.

    In searching for a fix for the same problem as thenewhustle, I stumbled across this post and saw it was very current. I haven’t followed up on monodistortion advice yet, but could it be that google adjax translation has not been updated yet to work with WP version 2.8?

    While I’m waiting on a response, I am going to take monodistortion’s advice and see if that fixes my problem. I’ll be back to let you know.

    I followed up on monodistortion’s advice and put the code in a single.php for starters. That didn’t seem to fix my problem unless there is a particular place the code should be inserted. I placed mine just below:

    <h2 class=”page_header”>Uh oh.</h2>
    <div class=”entry”>
    <p>Sorry, no posts matched your criteria. Wanna search instead?</p>
    <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
    </div>

    I am using Cutline 3-column.

    Hi Myidea,

    Could you start a new thread with your question? You may not have the same problem so it’s easier if there are different threads.

    Also, please tell me the version of Cutline you’re using. I haven’t looked at it before but I just downloaded version 1.4 and it looks like it should work.

    If you have a link to your site I can look at your html.

    Have you tried the plugin with the default theme?

    Also, it works fine for me in WordPress 2.8.

    Thread Starter thenewhustle

    (@thenewhustle)

    Hi monodistortion,

    I tried to put in the div tag to the pages themselves, but am unsure as to where their placement should be? Maybe that’s why it’s still not working?

    Would you mind taking a peek at my html code?

    https://www.thenewhustle.net

    Thanks!

    Thread Starter thenewhustle

    (@thenewhustle)

    Surprisingly my blog posts are working to translate, but not my main pages that I create … the only page I didn’t add the tag to was the page.php page because I didn’t see anything similar to that div tag in the code itself … please advise as to where to put it? encapsulating the entire page?

    Thanks this forum is amazing.

    Your blog pages look ok to me. They use the files index.php and single.php.

    The page.php file is used for the About page and other pages. It’s actually pretty simple if you look at the default theme and compare it to your theme. There’s a <div> right after the while loop and before the <h2> tag. The div is closed before the end of the while loop.

    Thanks monodistortion for replying.

    I’d be glad to start a new thread. No problem there.

    I am still using version 1.2 of Cutline. I probably should update. And I haven’t tried the default theme plugin.

    My site link is CPS-news. I’ll wait to hear from you once more before I start a new thread.

    Thanks for your help.

    I wanted to post this here as information only in case it could help others. If I need further help, I will start a new string as monodistortion suggested.

    (Note: I tried the default Kubrik theme and the translator worked.)

    I followed monodistortion’s advice and put the above suggested code in the index.php, single.php, and page.php. I placed them just under:

    <?php while (have_posts()) : the_post(); ?>

    It still would not work.

    I had the WP-Print plugin installed and activated. I deactivated WP-Print, and the translation worked fine. (I have no idea why that had an adverse affect on the translation.) However, another problem occurred from this. The translator plugin pushed my right side widgets to the bottom and placed them in the content box, leaving the right side widget area blank. I tried many things in an effort to correct this, but nothing has worked so far. (I suspect that is caused by some other php mods I’ve made.) So I commented out the language code until I can find the problem. Then I tried something else.

    I have a mirror image of my blog on a local host on my computer and that is where I do all my testing to see what works. I copied the three aforementioned php files from Cutline version 1.4 and replaced those files in my existing 1.2 version. Everything worked fine, so I activated the WP-Print plugin and the translation plugin still worked fine. I then added my custom codes to the 1.4 version files. Everything still worked. So far I see no adverse affect, but will do some further investigation before I do this to my online blog.

    As I said, if I have need for further help I will start a new string.

    Thanks.

    Thread Starter thenewhustle

    (@thenewhustle)

    mono thanks so much for all the help man, everything working beautifully now ??

    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!

    Hi reviewhostel,

    Please start a new thread for your problem. It looks like you’re using this theme?

    https://www.wpthemedesigner.com/2009/03/24/schemermag-theme/

    Hi,

    Have started a new thread 5days ago, nothing back yet.

    I am using that theme yes, can you help?

    Cheers

    I’ve noticed that a few people visited my site from here, so thought I’d update what I did.

    If you read my final entry above you will see my problem was not having the latest version of my theme. Above I had simply modified my older version with parts of the new theme version to get it to work. Since then I have update the entire thing to the latest version of my theme. For some of you still having problems, this could be the answer for you. If there is an updated verison of your theme, I would suggest that. Good luck to all.

    I have just installed “Google AJAX Translation WordPress Plugin” on WordPress and experienced the same problem that my posts are not translated. The comments are working just fine.
    I have also checked the existing posts relating to index.php and single.php but the structure looks different on my files and I can’t get the post translation to run.
    Would be great if you can have a look to my blog (Draft) at https://sch2.expertticker.net/

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Google AJAX Translation] Can see translator link and languages, but won’t translate pages’ is closed to new replies.