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

Posted:
Sat Dec 20, 2008 11:52 pm
by Qian Qin
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.
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Sun Dec 21, 2008 11:33 pm
by miqrogroove
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.
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Mon Dec 22, 2008 2:52 am
by miqrogroove
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

I tried changing themes too and they all show English tags and categories in the posts.
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Mon Dec 22, 2008 4:35 am
by miqrogroove
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);
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Mon Dec 22, 2008 8:26 am
by koostamas
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
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Mon Dec 22, 2008 9:20 am
by koostamas
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
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Mon Dec 22, 2008 10:39 am
by lorenzodetomasi
Thanks for the great upgrade!

How to translate widget titles with qT2.0?
Look at
http://isotype.org/it/ output
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Tue Dec 23, 2008 1:03 am
by Qian Qin
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...
Re: [HOWTO] Upgrade from 1.x/Polyglot to qTranslate 2.0

Posted:
Tue Dec 23, 2008 6:35 am
by tom
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!