WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Compatibility with qTranslate (39 posts)

  1. jstearn
    Member
    Posted 1 year ago #

    is there compatibility with qTranslate? Right now, I see both the English and the translated text in the browser title (except for the homepage, which displays translated text when it is supposed to and English text when it is supposed to). I have no entered any text in the SEO Title field since I can only enter one language, but was hoping the plugin would pick up off of qTranslate and display the correct title in the browser

    If there is a workaround or suggestion for one, I'm not opposed to getting my hands dirty, I am just not sure where I would go about doing it within the plugin code.

    I love this plugin and would like to make it work. There is a lot of SEO opportunity in non-English language sites.

    Thanks in advance.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. SteveW928
    Member
    Posted 1 year ago #

    It seems the official response is no **, but some folks seem to keep hacking some kind of integration unofficially (which seems to break with updates). This forum doesn't have a very good search, but if you just keep paging back in time and searching the page text of WordPress SEO for titles that include qTranslate, you should find a number of threads where it is discussed. (I haven't personally tried it yet.)

    I'm probably going to implement qTranslate for one client, but I'm not sure I'm going to try to integrate it with SEO at this point. I hate to provide a solution that just keeps breaking. That said, qTranslate seems to be the only option that is reasonable for them to implement. I wish there were some decent option for this.

    ** Joost says he doesn't and won't support it, but I've never seen an explanation (even a brief one) and threads which ask seem to get avoided (I've tried a few times).

    See:
    http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-multilingual-site-titling-in-all-languages?replies=8

  3. jstearn
    Member
    Posted 1 year ago #

    Thanks for the reply

    It's unfortunate Joost won't create a solution or offer an explanation, but I suppose understandable from his perspective since it would be a lot of effort. I am looking at ways of modifying the plugin myself for clients since I do a lot of multi-lingual sites, but as you point out the required maintenance looks to be a nightmare to keep it updated.

  4. SteveW928
    Member
    Posted 1 year ago #

    Be sure to look back for the 'hack' threads. While I'm not a programmer, it didn't actually look all that difficult. The big problem, it seems, is that the target keeps moving. Also, maybe I'm mistaken, but wouldn't the big SEO things be the title and meta descriptions? It would seem like Joost could add a category of fields for multilingual use, and then just provide a stable path in for plugins like qTranslate. (qTranslate META already exists to create such fields, but conflicts with Yoast on my understanding.)

    Maybe someone would even have to build a bridge type plugin (kind of like qTranslate META) to Yoast if the qTranslate folks didn't do it directly, but at least if it were a stable path in, the target wouldn't keep moving. I can certainly understand Joost not wanting to start fully supporting all sorts of various other plugins... but that doesn't seem to be needed, at least as far as I can see.

  5. ancawonka
    Member
    Posted 1 year ago #

    I'm interested in this as well, @steveW928. I've got one customer on qTranslate and we are having trouble updating the software (WordPress, plugins, etc). The qTranlsate forums seem pretty quiet, too. :(

  6. Beee
    Member
    Posted 1 year ago #

    I've emailed the author of qtranslate on several occassions, he mostly replies... why not ask him... ?

  7. SteveW928
    Member
    Posted 1 year ago #

    @ Beee -
    It just seems like a more appropriate question to be asking of Joost than the qTranslate author. It doesn't seem like qTranslate could add Yoast support, but more like Yoast would need to add some fields or a stable way in for qTranslate.

    And given the popularity and need for some kind of solution that isn't overly complex (which this would seem to be about it), it would be nice to have some kind of explanation. Is it just technically too difficult? Does Joost think there isn't enough interest? Is qTranslate a really buggy solution? Is there a developer spat going on between these authors? etc. Does Joost recommend some other solution?

  8. francesco1119
    Member
    Posted 1 year ago #

    Definitely: is there any other suggested free alternative solution to qTranslate or are we abandoned in the middle of nowhere?

    P.S. since yesterday update (11/12/12) I'm experiencing some trouble... aren't you?

  9. francesco1119
    Member
    Posted 1 year ago #

    Ok, found a solution: I changed from qTranslate to WP-i18n, a fork of WPML.

    Yoast was right: qTranslate was not that fantastic and with WP-i18n SEO is perfect as it has a different page for each language.

  10. SteveW928
    Member
    Posted 1 year ago #

    Thanks francesco1119, good information. I'm a bit scared of that WP-i18n you mention, as it doesn't look like much is going on with it. I'm not opposed to paying for WPML (or, rather I doubt my client is... and they probably even qualify for the free non-profit version) but it looked like a good bit of work to get going and maintain, and overkill for what they need, other than SEO compatibility. They really just need to provide an alternate language version of some of their blog posts.

    qTranslate just looked so simple in comparison, and a good fit. But, if it is problematic, than we wouldn't want to go that route either. I was really just hoping for some feedback from Joost, aside from... we won't support it.

    I do like the idea of a separate page for each language for everything, if it isn't too hard to get going and maintain. How was your experience in that regard? Maybe I need to take another look. (I seem to recall that it looked like a good bit of coding work to implement back when I checked... and administrative work to maintain the linkage between all the versions of the same article/page.)

  11. francesco1119
    Member
    Posted 1 year ago #

    I will tell you the true: I passed a boring week of manually copy/paste but maybe you can try: http://wordpress.org/extend/plugins/qtranslate-to-wpml-export/ that will do the job for you. (it's rated 5 stars!).

    I didn't have tried but it could works. With qTranslate I always had problems with "flag switcher" but now I use http://wordpress.org/extend/plugins/wpml-flag-in-menu/ that was a plugin for WPML but works also for WP-i18n. Check my site http://www.onoria.it/ (still work in progress).

    Try to search for "WPML" in WordPress plugin session: if all those plugins works for WP-i18n we are in front of a galaxy of fun.

    ---(for hotels' sites I strongly suggest the binomial WP-i18n + SEO By Yoast.)---

  12. Sevenhelmets
    Member
    Posted 1 year ago #

  13. alexleonard
    Member
    Posted 1 year ago #

    I got WordPress SEO to work with qTranslate by doing the following.

    I used quicktags (eg [:en], [:fr] etc) directly in the WordPress SEO Title and Description input fields. And then I added the following to my functions.php file.

    // Enable qTranslate for WordPress SEO
    function qtranslate_filter($text){
    return __($text);
    }
    
    add_filter(‘wpseo_title’, ‘qtranslate_filter’, 10, 1);
    add_filter(‘wpseo_metadesc’, ‘qtranslate_filter’, 10, 1);
    add_filter(‘wpseo_metakey’, ‘qtranslate_filter’, 10, 1);

    Worked perfectly for me.

    Found it here: http://www.webholism.com/blog/webholism/wordpress-qtranslate-and-yoast-seo/

    And I didn't need to do the extra steps he mentioned.

  14. francesco1119
    Member
    Posted 1 year ago #

    ...mmm.. yeah, I was also using shortcodes as [:it] in titles and <!--:it-->(whatever you want to say)<--!--> in metadescriptions but in the end you will have 1 page with 3 languages and not 3 pages for 3 different languages.
    If you put as title "[:it] Una buonissima Torta al cioccolato [:en] A tasty Chocolate cake [:es] Una buenisima Tarta chocolate" Google robots will read a huge title that could affect your ranking. The same will happen in the metadescription that will be extraordinary long!

    I thing this is the reason why Yoast suggests WPML and not qTranslate.
    As I don't want to pay I use WP-i18n that is just the same as WPML.

  15. alexleonard
    Member
    Posted 1 year ago #

    If you add those filters that I posted to your functions.php file the meta title and description are unique per language.

    So you have example.com/en/your-post/ and example.com/fr/your-post/ and each one has unique meta titles/descriptions.

  16. francesco1119
    Member
    Posted 1 year ago #

    If so it's interesting. I'm not a WP pro. so I've maybe not understood everything.
    We would like to see some example, if I'm not pretending to much.
    Could you give us some site example?

  17. Jaroslav Suhanek
    Member
    Posted 1 year ago #

    I had trouble only with Page title in <head>. All languages were together. Couldn't find the solution so i dropped to wpseo core files. In frontend/class-frontend.php line 308 goes like this:

    } else if ( is_singular() ) {
    	$title = $this->get_content_title();
    
    	if ( empty( $title ) )
    		$title_part = $original_title;
    }

    So in front of this elseif statement i added elseif that only applies to pages.

    } else if ( is_page() ) {
    	global $q_config;
    	$title = qtrans_use($q_config['language'], $this->get_content_title(), true);
    }

    And this fixed problem.
    I apologize because i didn't read posts above, but i just wanted to share this. :D

  18. Pedro Carvalho
    Member
    Posted 1 year ago #

    in the end, my solution was to get rid of all the contents in the title function; works for all of the 5 languages.

    function title( $title, $sepinput = '-', $seplocation = '' ) {
    	return $title;
    }
  19. solala
    Member
    Posted 1 year ago #

    // Enable qTranslate for WordPress SEO
    function qtranslate_filter($text){
    return __($text);
    }
    
    add_filter(‘wpseo_title’, ‘qtranslate_filter’, 10, 1);
    add_filter(‘wpseo_metadesc’, ‘qtranslate_filter’, 10, 1);
    add_filter(‘wpseo_metakey’, ‘qtranslate_filter’, 10, 1);

    This doesn't work with my WP3.5.1.
    Any suggestions?

  20. Pedro Carvalho
    Member
    Posted 1 year ago #

    solala, have you tried to edit the frontend/class-frontend.php and replace the title() function with this?

    function title( $title, $sepinput = '-', $seplocation = '' ) {
    return $title;
    }

  21. Rhand
    Member
    Posted 1 year ago #

    Is there a solution that works with current WP version that does not require the hacking of SEO by Yoast?

  22. WebGremlin
    Member
    Posted 1 year ago #

    Hello,

    Replacing the title function with

    function title( $title, $sepinput = '-', $seplocation = '' ) {
    return $title;
    }

    seems to work. As in: The preview snippet no longer shows both qTranslate languages in the title. Now it only shows the primary language.

    Could someone explain to me how I can verify that the title is now displayed correctly for SEO? And does it always show the primary language now, or does it change language accordingly?

    WP: 3.5.1
    Wordpress SEO: 1.4.7
    qTranslate: 2.5.34

    Link: http://www.vacationsnerja.com

  23. b_machuel
    Member
    Posted 1 year ago #

    There were 2 issues with multilingual window titles:
    - static pages
    - static posts page
    where titles were aggregated in all available labguages.

    In class-frontend.php, I did one change and one addition as follows, starting line 322:

    } else if ( $this->is_home_posts_page() ) {
    			$title = $this->get_title_from_options( 'title-home' );
    // Changes start here
    // Changed to tackle multilingual issue on posts page
    		} else if ( $this->is_posts_page() ) {
    			global $q_config;
    			$title = qtrans_use($q_config['language'], $this->get_content_title( get_post( get_option( 'page_for_posts' ) ) ), true);
    
    // Added to tackle multilingual issue on pages
    		} else if ( is_page() ) {
    			global $q_config;
    			$title = qtrans_use($q_config['language'], $this->get_content_title(), true);
    // end changes
    		} else if ( is_singular() ) {
    			$title = $this->get_content_title();

    Window titles are now displayed correctly on all pages: static home page, static posts page, posts and pages.

  24. nothing.in.return
    Member
    Posted 1 year ago #

    @b_machuel: it WORKS! Thank you VERY much.

  25. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    I think alexleonard's reply above is the best, as you could do that from your functions.php... We're adding that to the FAQ, but we don't plan on adding support to the plugin itself.

  26. renato.galvao
    Member
    Posted 1 year ago #

    The reply of alexleonard's had a little mistake for me.

    Just replaced the ` with the ' and it <strong>WORKED BEAUTIFULLLY</strong>.

    Add this to your theme functions.php

    // Enable qTranslate for WordPress SEO
    function qtranslate_filter($text){
      return __($text);
    }
    
    add_filter('wpseo_title', 'qtranslate_filter', 10, 1);
    add_filter('wpseo_metadesc', 'qtranslate_filter', 10, 1);
    add_filter('wpseo_metakey', 'qtranslate_filter', 10, 1);

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  27. renato.galvao
    Member
    Posted 1 year ago #

    Found a bug on this solution.

    The og:title(for Facebook) got the text itself like:

    <meta property='og:title' content='[:pt]Histórico[:en]History'/>

    Any ideas?

  28. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    I'd replaced the quotes indeed in our FAQ entry :)

    the og:title has its own filter, wpseo_opengraph_title that you could hook on to.

  29. renato.galvao
    Member
    Posted 1 year ago #

    #genius

    Thanks Joost!

  30. renato.galvao
    Member
    Posted 1 year ago #

    Just an update for the lazy guys and girls... :)

    // Enable qTranslate for WordPress SEO
    function qtranslate_filter($text){
      return __($text);
    }
    
    add_filter('wpseo_title', 'qtranslate_filter', 10, 1);
    add_filter('wpseo_metadesc', 'qtranslate_filter', 10, 1);
    add_filter('wpseo_metakey', 'qtranslate_filter', 10, 1);
    add_filter('wpseo_opengraph_title', 'qtranslate_filter', 10, 1);

    Don't forget to update the Yoast plugin(mine is 1.4.13)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic