“the j stands for June”
about me | blog | facebook profile | linkedin profile | twitter profile | stuff i've done | stuff i like | wordpress plugins

10 January, 2010

qTranslate and multilingual META tags

Filed under: Web Development, Wordpress Plugins — Tags: , , , , , — John @ 1:23 am

I use Wordpress with qTranslate, but I needed to have multilingual META tags which qTranslate doesn’t support – so I wrote a plugin to do the job myself. It’s pretty basic, but I thought I would share in case anyone else needs something similar.

Plugin can be found on Wordpress’ Plugin site here: qTranslate Meta at WP Plugin Directory.

17 Comments »

  1. I really like qTranslate and I also use it with my blog. Today I found your plugin on my WordPress Dashboard. But as you mentioned, that it doesn’t work well with All In One SEO, I don’t know why you should use it, if you have All In One SEO installed. I do have this plugin installed and as I translate all tags using the additional language inputs qTranslate adds to the tags administration, All In One SEO will automatically use the correct language for the tags and also for the title (and the canonical META tag).

    But maybe there is something really new with your plugin I didn’t see.

    Comment by Kau-Boy — 11 January, 2010 @ 4:04 pm

  2. Hey,
    I appreciate your interest. However I’m not sure I understand what you mean.
    If I have a page which is available in multiple languages, then I want to have META keywords and META descriptions in each language. So:

    Etc.. are you saying AIOSEO can do this?

    Comment by John — 11 January, 2010 @ 4:16 pm

  3. Yes it does. Just navigate to your Posts->Post Tags menu and click on the “edit” link of one of your tags on the right side. Than you should see “Tag Name (English)” and “Tag Name (Spanish)”. By default, qTranslate adds the main language, let’s say it’s spanish in your case, to all other languages.

    Once you have translated the tags, your done. As AIOSEO get’s it’s tags after they have been translated by qTranslate, you should see them in your source code. AIOSEO also adds a “description” meta tag with some lines of your post content.

    For an example look at this site: http://kau-boys.de/software/kostenlose-alternative-zum-cisco-vpn-client-unter-windows-7-x64-64-bit

    If you switch to the english version, you should see “operating system” instead of “betriebssystem” in the meta tag “keywords” and an english text in the “description”.

    I know it is not very comfortable to translate the tags (and categories) one-by-one trough your administration. So it would be very nice, if in a new version of qTranslate, you can add new tags in multiple languages within the “Add new” section. But I usually use acronyms for my tags, so I don’t have to translate many of them.

    I hope this tip was helpful for you.

    Comment by Kau-Boy — 11 January, 2010 @ 4:30 pm

  4. Hmm I see, I honestly never paid attention to that. It is a good approach and I’m sure many will find it an ideal alternative to my plugin. However there’s still a few issues which this does not handle:

    1. This only works for meta keywords, not for meta descriptions or any other meta fields (as far as I can tell)
    2. It is somewhat limiting on your keyword flexibility. For one thing, all your posts need to have the exact same number of keywords in each language, whereas this is not always applicable. For SEO reasons you may want to add multiple alternatives of the same word in one language (eg “flashlight”, “torch”) which is just not applicable in other languages.
    3. Lastly, my plugin also offers an option to modify the browser title per language. This may be desirable when you want the browser title to contain more detail than the page/menu title.

    Thanks again for your comments. Like I said I have no doubt that your approach may be sufficient for certain users.. but I needed a little more flexibility for my own case.

    Comment by John — 11 January, 2010 @ 4:57 pm

  5. i am using your plugin for a multilanguage site (3 languages) and even though AIOSEO can be used in multilanguage sites i find your plugin lots better simply because my customers who want multiple lingo sites cannot be expected to learn to use the langage tags. I provide the SEO capabilities (custom title and description tags per page) and they insert the key words etc.

    In my opinion it is a lot more user friendly for the customers to use your plugin because they can just insert the keywords and don’t have to worry about tags etc.

    Well done.

    Comment by Harry — 28 January, 2010 @ 1:35 pm

  6. I’m using qTranslate on a local testsite together with qTranslate Meta and had no problems to install and configure both plugins. These are really great plugins for multilang-sites, many thanks to Qian Qin and John for their effort!

    Now I wanted to run the plugins on a livesite, installed them but when trying to activate qTranslate Meta I get the following error message:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected T_NEW in /web/1/000/032/552/99242/htdocs/wp-test/wp-content/plugins/qtranslate-meta/qtranslate-meta.php on line 36

    Can someone figure out the reason for this error and give me some advice what I have to do now?
    Thanks a lot

    Comment by Heike — 1 March, 2010 @ 2:51 pm

  7. Hi Heike, thanks for your comments :)
    With regards to the error you are experiencing, please confirm that qTranslate is already activated before activating qTranslate META.

    Comment by John — 1 March, 2010 @ 3:07 pm

  8. Thanks for your reply, John. Of course I activated qTranslate first.
    I also checked the usual things that may cause trouble (no SEO-Plugin installed), updated wordpress to the latest version (2.9.2) and used also the latest versions of qTranslate (2.5.6) and qTranslate Meta (0.7.1).

    On the local environement everything works fine, so I have no idea what’s going wrong with the livesite – maybe the database is buggy.
    I’ll give it another try tomorrow by setting up everything with a new database on the server and let you know when I had success.

    Comment by Heike — 1 March, 2010 @ 7:34 pm

  9. Heike, I doubt this is a database issue, but rather something to do with different PHP settings on your server. This should temporarily fix your problem though:
    Simply comment out line 36 of qtranslate-meta.php (It is not part of the plugin functionality anyway).
    If it still complains, simply replace line 36 with:
    die();

    I will try to fix this properly in a future update. Perhaps you could send me a dump of your phpinfo by email?

    John

    Comment by John — 1 March, 2010 @ 9:17 pm

  10. After some looking around, I suspect your live server is using PHP version 4.x – can you please check this and let me know?

    John

    Comment by John — 1 March, 2010 @ 9:39 pm

  11. *taking my hat off to John*
    PHP 4 was the culprit. After changing to PHP 5 everything runs like clockwork :-)
    Thank you very much

    Comment by Heike — 2 March, 2010 @ 11:25 am

  12. A question. Can the keywords entered in the Multilingual META window be used to generate some tags list? I am thinking of tagging WP pages (vs WP posts that already have tags widgets) in order to be able to produce lists of pages (and of posts also, why not) dealing with a particular subject described by a specific keyword.

    Comment by Diana — 6 March, 2010 @ 10:41 pm

  13. Hi Diana
    No, currently the META tags cannot be used as Wordpress post tags and to be honest I don’t have any plans to implement them as so.
    However if someone wants to add this feature themselves I would gladly consider adding it to the plugin.

    Comment by John — 7 March, 2010 @ 10:54 am

  14. just curios: do you have any experiences with qtranslate and mailpress? mailpress.org is a great newsletter plugin, but I am having trouble with it as the newsletter language tags do not get “translated” i.e. the newsletter subject looks like this: This week at Quilombo even if I don’t send out a newsletter in multiple languages as the newsletter editor automatically creates the multiple language tabs :-(

    If you can be of help with this problem, please get back to me otherwise, sorry to have bothered you. I’d be willing to donate for a solution.

    Comment by ovidiu — 9 March, 2010 @ 1:41 pm

  15. Hey there
    Yes actually I do use MailPress together with qTranslate. The way I handled this was basically creating my own MailPress theme (by copying one of the default ones) and then modifying it to my needs. Apart from aesthetics, this in particular involved using the localisation functions __($myvar) to ensure that the qTranslate tags were correctly handled.
    I know this is not an ideal solution in that it does require quite a bit of work. In addition, a word of warning: keep backups of whatever MailPress themes you create, as auto-updating the plugin will erase any custom themes.

    Comment by John — 9 March, 2010 @ 2:26 pm

  16. Hi John,

    Thanks for the nice plugin! I researched the whole SEO / META -matter for a whole day, comparing your plugin to “All in One SEO Pack” as well to “Platinum SEO Pack” (which is supposed to be more compatible with qtranslate than All in 1 SEO pack), but in the end I came to the conclusion that there’s actually nothing in regards of SEO and META that your plugin wouldn’t offer – in other words – it’s the best choice for someone who uses qtranslate.

    The only thing I perhaps would like to see is a “noarchive” option for some pages, but that’s only a minor setback.. in fact so minor that I’m wondering why on earth do you answer the question:

    “Why does it not work with AIOSEO / other SEO plugins?”

    .. with:
    “Yes, I know this is a major drawback.”

    I see hardly any drawbacks. Or are there really some which I haven’t thought about?

    Comment by Milan Kolarovic — 11 March, 2010 @ 5:43 pm

  17. Hey Milan,
    Thanks for the kind words :)
    Well to be perfectly honest, I answered that way because I never really analysed the full extent of the AIOSEO’s abilities. In other words, I know there’s a bunch of other SEO considerations out there, but my plugin really only tackles one particular thing; so if someone is looking for some total SEO solution they might find it limiting that my plugin won’t necessarily work with other Wordpress plugins…
    But yes, maybe “major drawback” is an over-statement, I think I’ll actually change it ;)
    PS If you like the plugin, I would appreciate it if you would rate it in the Wordpress Plugins Directory.

    Thanks!

    Comment by John — 11 March, 2010 @ 7:03 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress