[HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.x

Having Problems? Need Help? Post here!

[HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.x

Postby Qian Qin » Sat Dec 20, 2008 11:52 pm

As you might know, qTranslate 2.0 is quite different from qTranslate 1.x. Here is a short (incomplete) list of things that changed:
  • New Language tags:
    Code: Select all
    <!--:en--><!--:-->
    instead of
    Code: Select all
    [lang_en][/lang_en]
  • Tags/Categories/Link Categories are not using language tags anymore
So these two things will be needed to be updated to make qTranslate 2.0 work. qTranslate will convert old language tags to new ones for you. All you need to do is to go the the "Languages" Settings page, click on "Show" for Advanced Options and click on the link for converting your database. See the attached screenshot for details.
For the second part, you will need to manually update all your categories, tags and link categories.
Attachments
clickhere.png
Link for converting Database to qTranslate 2.0 format
Qian Qin
Site Admin
 
Posts: 964
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby miqrogroove » Sun Dec 21, 2008 11:33 pm

Qian Qin wrote:[*]Tags/Categories/Link Categories are not using language tags anymore[/*]


What? Does this mean all tag and cateogry translations will be lost forever? I would rather not upgrade if it's going to break all of these features.
miqrogroove
 
Posts: 74
Joined: Sun Jul 20, 2008 4:18 am

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby miqrogroove » Mon Dec 22, 2008 2:52 am

I figured out that the tags and categories can still be translated.

But there is a big problem! The translations only appear in the sidebar. The "Tags" and "Posted In" section of the posts are always in English now :cry:

I tried changing themes too and they all show English tags and categories in the posts.
miqrogroove
 
Posts: 74
Joined: Sun Jul 20, 2008 4:18 am

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby miqrogroove » Mon Dec 22, 2008 4:35 am

Holy hell! It took me 5 hours to figure this out.

in wp-includes/taxonomy.php function wp_get_object_terms()

find
Code: Select all
   return $terms;


replace with
Code: Select all
   $terms = apply_filters('wp_get_object_terms', $terms);
   return $terms;


in qtranslate_hooks.php

find
Code: Select all
add_filter('get_terms',                  'qtrans_useTermLib',0);


replace with
Code: Select all
add_filter('get_terms',                  'qtrans_useTermLib',0);
add_filter('wp_get_object_terms',         'qtrans_useTermLib',0);
miqrogroove
 
Posts: 74
Joined: Sun Jul 20, 2008 4:18 am

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby koostamas » Mon Dec 22, 2008 8:26 am

Greetings!

First thing: THANKS for the plugin!
Second: I am sure, you do your best to make this plugin the best.
Third: I understand, that you re-wrote the plugin with a new, and better idea.

Of course, we all, who have already used it would like to convert to the new version... the easiest way.
And, I am sure, you do your best, again, to assist all of us with this transition.

May I ask you to describe again how to convert... in a way, that even me can understand it. (My knowledge of php, and thses things is very limited!)

Again: THANKS and greetings

Tamas
koostamas
 

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby koostamas » Mon Dec 22, 2008 9:20 am

Hi again!

I went trhough the changes... nad it WORKS now!!!
Great!
Thanks!

When re-modifying the Tags, Categories and Link Categories... the olda values are displayed... just I had to remove the "bla-bla" before and after the correct text.
It tooks some time, true, however, I think, I can invest this time... I am sure Quian Qin ahs put into it much more time and effort.

Thanks Q!

Greetings and Happy Xmas and New Year!

Tamas
koostamas
 

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby lorenzodetomasi » Mon Dec 22, 2008 10:39 am

Thanks for the great upgrade! :-)

How to translate widget titles with qT2.0?
Look at http://isotype.org/it/ output
lorenzodetomasi
 
Posts: 32
Joined: Tue Jun 24, 2008 11:24 am

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby Qian Qin » Tue Dec 23, 2008 1:03 am

miqrogroove wrote:in wp-includes/taxonomy.php function wp_get_object_terms()
[/code]


you should report that to the WP developers so they can start include missing filters.
I added a workaround which doesn't work as perfectly but doesn't need changes on WP side to the latest development version.

i'm working on the widget title issue...
Qian Qin
Site Admin
 
Posts: 964
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby miqrogroove » Tue Dec 23, 2008 4:49 am

miqrogroove
 
Posts: 74
Joined: Sun Jul 20, 2008 4:18 am

Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Postby tom » Tue Dec 23, 2008 6:35 am

Help! I just upgraded to qTranslate 2.0 and followed Q's steps, converting database, etc. However, when i try to toggle between languages on the website, I receive a "404 - no URL found" error. Did I do something wrong? Please help! Thanks!
tom
 

Next

Return to qTranslate Support Forum

Who is online

Users browsing this forum: No registered users and 3 guests