Support » Plugin: GTS Translation Plugin » [Plugin: GTS translation] broken links in translations

  • First of all, thanks for a great plugin – if I can get it all working, it will be **GREAT**.

    I’m using WordPress as a CMS, so I have no posts, only pages, if that makes any difference.

    I just installed the plugin and started it rolling yesterday.

    I notice that many of the internal links lead to either the English Language versions of the pages, or to ‘sorry, you have requested something that does not exist’

    It’s practically impossible for, say, a French speaker who speaks no English to use the site.

    Is this something I should expect to resolve itself over time, or if not, how can I fix it? The links were created using WordPress 3.1’s new linking feature.

    Also, image captions don’t seem to be translated, and the plugin changes tags like ‘[map:‘ to ‘[carte:]‘ which will break the maps embedded by the map plugin I use.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author stevevls


    Hi there. Thanks for taking the plugin for a spin. I’m the developer that maintains the plugin. Let’s see what we can do for you…

    First off, it should be no problem that you have pages and not posts. As you publish pages, they’ll be translated. Can you send me a link to your blog so that I can poke around and see about the pages that don’t have translated content yet?

    As for the links, that can be tricky business. If the link is generated by WordPress, then it should go to a translated page. However, when the links are in the post or page body itself, it’s difficult to infer whether it should link to a translated post or to the original and we just leave it be. Unfortunately, the new feature in WP 3.1 inserts the link as HTML…it doesn’t use a nifty internal function call that we can hook into.

    Shortcodes in the post are another troublesome area. We remove short codes before sending the post off for translation, but many plugins don’t register their shortcodes for admin screens…and if they’re not registered at the time you publish your post, we can’t tell the difference between a shortcode and bracketed text. The only fix there is to modify the problem plugin.

    So, if you can send me a link to your blog, I’ll see if I can turn up anything else.


    Thanks for the quick response!

    The URL is

    PS – is there a step-by-step guide to virtual hosts? Do I make (say) serve pages from the same folder as www,, or do I somehow need a whole new wordpress install?

    Plugin Author stevevls


    Hi again.

    I notice something interesting, which is that all of the permalinks are localized. If you hover over the links in the left sidebar after changing the blog language to Spanish for example, you can see that the URLs are translated.

    So I guess that means we have two questions… The first is why the text for the links is in English. How are you generating the links in the sidebar? The second is, why aren’t the localized URLs working? A very common reason is that there’s a plugin that’s conflicting with ours…can you tell me which other plugins you have installed?

    As for the virtual hosts, a number of people have asked the same thing lately, so I’ll be putting together a guide very soon. I’ll let you know when I’ve got it put together.


    Look forward to seeing the guide!

    Ok, here’s my list of plugins…

    Google Maps (responsible for translating [map:http://bla] into a map – the word ‘map’ gets translated
    GTS Translation (hopefully this one is compatible with itself!)
    Hello Dolly (not activated)
    Joomla/Mambo to WP Migrator (not activated – I used this to move my site from Joomla to WordPress, then deactivated it)
    Meta SEO Pack – I tried disabling this, but it had no immediate effect
    Recently Popular – this produces the ‘popular’ list at the bottom of the sidebar – I also tried disabling this, but it didn’t immediately help.
    WP Google Analytics
    XML Sitemap Feed

    Bizarrely, in the list of ‘most popular’, some URLs are translated and others aren’t – eg, vs in French. Some URLs of the form redirect to the French version ( ?) with the translation, others redirect to a 404. It’s bizarre.

    Thanks for trying to help me nut it out!

    Ok, I see I left one of your questions unanswered.

    There are two sets of links in the sidebar.

    The top set is generated using the ‘Menu’ feature in WordPress. Initially I had some trouble with this because of an incompatibility with a plugin. (Joomla/Mambo Converter, I think)

    The bottom set is generated by the ‘Recently Popular’ plugin and its widget.

    Plugin Author stevevls


    Hi again.

    I’ve been digging into why the page titles aren’t translating, and I was able to find why the English text is showing up for your menu pages. The menu functionality does some slightly non-standard stuff, but I found a workaround. We’ll be releasing a new plugin (version 1.1.7) soon, so keep an eye out for that.

    As for the Recently Popular plugin, it’s not going to be possible to translate the list that it’s spitting out. Unfortunately, instead of using WP code to get at the posts, they’re doing a direct select against the database, and they’re not calling out to any hooks or filters afterwards. They should be at the very least invoking the filter for ‘the_posts’ if they want their plugin to play well with others.

    Finally, I’m still unsure why you’re getting 404s… It’s difficult to debug from here. My guess is that something about the way we’re modifying the select statement for pages isn’t working in your environment. Would you mind trying deactivating all of your plugins (including GTS) and then re-enabling only GTS? If it works, then we can start looking for conflicts. If it doesn’t, then it’s something internal. Also, can you check for any PHP errors in your server logs? We’ll see what that turns up…


    Plugin Author stevevls


    Actually, I just thought of something… Do you have a permalink structure set as just the post name? If that’s the case and you don’t have any posts in your database, then you’ll get a 404. That happens because ambiguity is introduced into the rewrite rules. If you see that your permalink is just the post name, change it to anything else, and the pages will start working.

    Yay! Your tip about permalink structure did the trick!

    I indeed have no posts, since I’ve done everything as pages, and my permalink structure was set to /%postname%/

    ‘Recently Popular’ is still doing bizarre things, and still gives 404 errors, but is fine. Never mind, there are plenty of ‘popular’ plugins out there.

    Now the only issue left is the absolute URLs in the page body. Perhaps the best solution for me, if your software can’t do it automatically, is to use the ‘virtual hosts’ feature and change all the links from “” to “/english-url/”

    How does it work for other people? Or do most of your users just write blogs with no internal links?

    Plugin Author stevevls


    Great! I’m glad that worked.

    The absolute URLs is a tricky one to solve. Most of our users thus far are using WP as a blog rather than a CMS, so they haven’t found it to be too much of an issue…more of a nice to have if anything.

    One idea I had was to provide a shortcode tag for links, so you could add a snippet like [gts-permalink 'permalink-name'] and it would rewrite itself to whichever language is currently selected. Something to mull over with future versions of the plugin…

    yes, or have the plugin look for links on the main domain, and rewrite those that refer to translated pages…

    BTW – what happens if I modify a page that’s been translated?

    Plugin Author stevevls


    I’ve thought about rewriting links on the main domain, but the problem there is that it’s possible that a user may want the link to point back to the original text or a specific translation. That’s why I was thinking about the shortcode…so the intention is clear. I really wish that WP had a good mechanism for inter-blog linking that we could extend from…the use of plain old URLs seems short sighted to me!

    And…if you modify a page, we’ll run it through the translator again.


    I suspect that most non-English speakers visiting a translated website would want links to stay on pages in their own language…. therefore most webmasters would want this too. But it could be an option in the admin pane..

    You may consider this a humble feature request from a very excited new user 🙂

    After all, you’d still have to decide what to do in the absence of a shortcode….

    Plugin Author stevevls


    Cool man…I’ll put it on the request list. An initial looks tells me that it could take some effort, so I won’t be able to get to it right away.

    Just wanted to let you know that I just packaged up a new version (1.1.7) for release that should fix your problem with menus displaying in English.



Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Plugin: GTS translation] broken links in translations’ is closed to new replies.