Gengo: Wordpress plugin for multiples language

If you need multi language support for your Wordpress, go for it: It’s the best one of all which support multi language.

If you need like me to do some posts in one language, some in other, and later if you have time do some translations, then this is the only one which supports that as far as I know.

Well… the plugin it’s nice, I like it and it seems to support all it claims.

However there is a big important gotcha… if you implement this plugin, all your old url’s are going to start being redirected. As all links will change also in every place of wordpress, this will affect you as much as popular you are. In my case this is a new wordpress instalation so really don’t care, but if you have a thousand page indexed by search engines, this will kill your rank.

I’m now trying to join the developers group to try to convince to move all thos redirects to be permanent (301) and not 302 like they use now. In the meantime, I’m going to share a small temporary fix for this.

In my specific case what was a mess was that I had a very good ranking on search engines in the root page of this domain, so if I don’t do 301 redirect from that page, I’m probably going to lost all that old and good ranking for my keyword — which is my first & last name –.

So this is the fix I found for me, without looking too much, just trying to get straight to the point and avoid as much change as possible in current gengo code, it’s with a single extra line of code in gengo.php.

Find line 1706:

header('Location: ' . $this->append_link_language($_SERVER['REQUEST_URI'], $code_string, true));

Prepend before that line:

if ( strcmp($_SERVER['REQUEST_URI'],”/”) == 0) header(”HTTP/1.1 301 Moved Permanently”);

Done! This little fix will take care of send a 301 (instead of a 302) only when the required redirect it’s from the root of the domain, but not when it’s in any other parts of the site.

Anyway, the best way to fix this will be to leave the current urls as they are and support that no lang in url means default language. Instead of current model of force a change in every url. As I’m not a wordpress plugin developer I don’t know how hard or easy should be to implement this change.

Hope someone finds this useful and if you fix it better, please share your code.

Useful Links: Gengo Plugin

Translations: No Translations Available

Tags: , , , , ,

WordPress database error: [Can't open file: 'wp_comments.MYI'. (errno: 145)]
SELECT * FROM wp_comments WHERE comment_post_ID = 48 AND comment_approved = '1' ORDER BY comment_date

Leave a Reply