I’ve created a Drupal module which replaces the anchor text of links to node translations with the page title of that translation.
The Problem with Default Drupal Translation Links
One thing which milled around my mind a bit recently is the apparent SEO un-friendliness of the default way Drupal implements translation links. By “translation links” I’m referring to the links that appear at the bottom of any node that has translations. By default, with the translation icons module enabled, they look something like this:
![]()
If you don’t have translation icons enabled, you don’t get the flag images but otherwise the problem remains the same. Which problem is that?
You Are Linking to Every Translated Page on Your Website with Irrelevant Anchor Text
Let's harness the SEO consultant within and think about the topography, or link profile, of your website. Every page is linked to every translation of that page. In SEO terms it makes sense to link to your internal pages with SEO-optimised anchor text; text that describes the page you are linking to. However by default Drupal links to these pages again and again with text like "English" and "Deutsch". Isn’t it a bit silly that every German page on your website has an incoming link from another page on your website with the anchor text "Deutsch"? How much better it would be if those links used relevant anchor text! Better in SEO-terms that is, in useability terms the superior method is debatable. If using language names is better in useability, it’s certainly not so much better as to make this a really bad idea.
Solution: Replace the Anchor Text with the Page Title of the Destination Page
What is the most SEO-optimised part of a page? It’s not the title, in fact. It’s the so-called “page title” – that is the part that is in the <title> tag of the HTML. By default those two refer to the same thing, but if you are an SEO gun you probably have the Page Title module installed and as such, you might have the page title set separately, and highly optimised because this is the most important text on the page.
So we want to replace the anchor text with the page title of the destination node.
The Module Itself
Well being a bit of a Drupal developer I knocked together this simple little module which calls hook_link_alter to modify the translation links to use the page title field instead, or if page title isn’t separately set, it uses the standard node title field.
Download the Translation Anchor module. It runs on Drupal 6.
Putting the Module into Action
After installing and enabling the module, I found that the links looked a bit funny because they were printed inline with really long titles. In my case they looked like this:

I recommend printing them with display:block instead of display:inline. The simplest way to do this is to add the following to your theme:
.links ul.links.inline, .links ul.links li {
display:block;
}
This overrides the system-menus.css style sheet which tries to display them inline. Note that this is really quite bad Drupal practice, I think you should remove the “inline” class from the links instead, but this will do for now. After that, I ended up with this:

Check out a live example at the Abla Lenguas escuela de idiomas website (scroll to the bottom of the page).
Note that if you’re using teasers and have “Read More” links, you might experience undesired behaviour with the layout of these links.
Please Suggest Improvements
This is just a proof of concept. I did enough to get it working on one of my sites and see if I like it, but there are plenty of things that would need to be done differently if it were “officially released”. I think I would like to get it going nicely in a Drupal-friendly way at some point so please report your experiences with the module in the comments, including any ideas for improving it. And enjoy.
Recently a chap named certain Walton contacted me to ask how how we got the bible text to pop up when you hover your mouse over scripture references on the
6 comments
I've been searching for an answer to this problem for a couple of hours and finally found the right keywords to bring me to this post. SEO is the exact reason I dislike these links. I'd prefer to get rid of them completely though. Right now I have a drop down on the home page that directs users to the various translations for my site. I want that to be the only point for them to move between sites. Right now I am hiding the language links on all of the subpages using CSS...definitely not the best SEO solution.
Just thought I'd suggest that you offer another option/solution to this problem which is a module to remove the links from subpages.
Thanks for this post though. It addresses a problem no one else has.
Hi Jason,
Glad you found it useful. I know that feeling with searching!
I think there's an option in the i18n module to not show language links on nodes. You can certainly take it out by modifying the theme but that takes a bit of drupal knowledge. However as said I think the i18n module has a configuration option for this. Check out this issue: Remove language links from nodes and use language switcher block only
Nice post,thanks.
Thank you very much for this useful information. Please keep on . I am looking forward to read your next great article. Best regards!!! Sam
Awesome!! It’s just what I need!! Thanks!
Hi,
I like this module, you should publish it or better integrate with i18n.
Only problem is that the language icons have now disappeared, somebody found a workaround ?
Post new comment