WordPress.org

Forums

mqTranslate
[resolved] mqTranslate and multilingual SEO with Yoast seo (66 posts)

  1. somesh01
    Member
    Posted 1 year ago #

    Hi,

    I uploaded my website to wp 3.9, I changed from qTranslate to mqTranslate and it is great.

    My problem: I was using this trick to have Multilingual SEO title, keywords and meta-description. For example

    [:en] I like soccer[:it] Mi piace il calcio

    Unfortunatly moving from qTranslate to mqTranslate I cannot use anymore this trick for the Meta description because if i type "[:en] ....[:it] ...", they disappear when I save. I can keep this trick for the SEO title and SEO keywords but not for the meta-description.

    What can I do?

    Plaese help, I am sure that i am not the only one using it to get seo in different languages.

    Thank you

    https://wordpress.org/plugins/mqtranslate/

  2. chsxf
    Member
    Plugin Author

    Posted 1 year ago #

    We do not use Yoast SEO but it seems other mqTranslate users are using it. I hope they will be able to help your faster than us.

  3. somesh01
    Member
    Posted 1 year ago #

    Thank you,

    1)For mqTranslate and Yoast users: I discovered just now that the meta-descriptions keep the trick if I am in the dashboard with all the pages but it doesn't show up if I open each page to edit...????...I hope it keep going to work! If someone knows, please help help help!!!!

    2)For Plugin author: A question: which SEO plugin do you use? or suggest me to use? I can change from Yoast but what I need is a plugin that gives me the possibility to have SEO title, SEO keywords and Meta-description in two languages.

    Thank you

  4. chsxf
    Member
    Plugin Author

    Posted 1 year ago #

    2) Sorry, but at this time, we don't use any SEO plugin.

  5. somesh01
    Member
    Posted 1 year ago #

    Dear chsxf Member,

    I think I am gonna to migrate from Mqtranslate to WPML.

    I saw that there is a plugin that allow the migration from Qtranslate to WPML. Can you tell me if I can do it also from Mqtranslate? Or do I have to migrate again from Mqtranslate to Qtranslate and then to WPML.

    Thank you

  6. Lesrad
    Inactive
    Posted 1 year ago #

    I use yoast seo with mqtranslate it works fine for the most part, the same as it was for qtranslate check my posts about it here http://wordpress.org/support/topic/dublicate-title?replies=2 Follow the links on those threads (leslierad) - me too this is my iPhone username

    Check my site winallpoker.com to see mqtranslate with yoast seo and yoast site map in action.
    Wp 3.9 and yoast and mqtranslate latest versions.

    Let me know if you still need help

  7. chsxf
    Member
    Plugin Author

    Posted 1 year ago #

    @somesh01: I cannot guarantee it will work with mqTranslate (even if mqTranslate stores data the exact same way as qTranslate). So I recommend migrating again to qTranslate before migrating to WPML.

  8. AntoineD.
    Member
    Posted 1 year ago #

    @somesh01 , I'm in the same situation as you but decided not to swift to wpml due to the bad reviews on it (migration issues, loading time, SEO...).

    However, would be really interested if you could let us know more about your "trick" for multilingual meta-description and multilingual page title ?

    Thanks in advance !

    note: i'm still running qtranslate.

  9. somesh01
    Member
    Posted 1 year ago #

    @ chsxf Member,

    How can I do the migration again?

    Thank you

    @ AntoineD.,

    Use qtranslate slug for url in different languages and than you have to put this code to have SEO in different languages in meta description, seo keywords and seo title: for ex: [:en] I love soccer[:it] Amo il calcio

  10. somesh01
    Member
    Posted 1 year ago #

    @ lesrad

    I use the same trick, for ex: "[:en] I love soccer[:it] Amo il calcio"
    to have seo in different languages. I use it for the Seo keywords, Seo title and Meta description.

    The problem is that it is not working for the meta description since I moved from qtranslate to mqtranslate.
    When I put "[:en] ...[:it]..." in the meta description they disappear!
    Help!!!!

  11. leslierad
    Member
    Posted 1 year ago #

    @somesh01
    Do you want to get Yoast working on mqtranslate or do you want ot migrate to WPML?

    WPML may be a bad choice, if you go there no way to come back - lol

    If you want Yoast to work, you need to follow the steps I sent in the link.

    First, check your functions.php if you used the same trick for qtranslate - change QT_SUPPORTED_WP_VERSION to QT_MAX_SUPPORTED_WP_MAJOR_VERSION

    like below:

    // Enable qTranslate for WordPress SEO
        if(defined("QT_MAX_SUPPORTED_WP_MAJOR_VERSION")) {
        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);
        add_filter('pop_most_viewed_content', 'qtranslate_filter', 10, 1);
        }

    wordpress.org/support/topic/wordpress-seo-1521-with-qtranslate

    Here is my Yoast from backend
    http://s30.postimg.org/3xcugpmj5/Capture.jpg
    add http://www. to
    winallpoker.com/party-poker-cash-game-missions/
    winallpoker.com/de/party-poker-cash-game-missions/
    winallpoker.com/es/party-poker-cash-game-missions/
    They all work fine when saving and editing

  12. leslierad
    Member
    Posted 1 year ago #

    IF it still doesn't work after the above change
    try:
    \wordpress-seo\js\wp-seo-metabox.js

    -- var desc = jQuery.trim(yst_clean(descElm.val()));
    ++ var desc = jQuery.trim(descElm.val());

    save wp-seo-metabox.js as wp-seo-metabox.min.js

    Like I explained here:
    http://wordpress.org/support/topic/wordpress-seo-1521-with-qtranslate?replies=3#post-5392030

    Just change change QT_SUPPORTED_WP_VERSION to QT_MAX_SUPPORTED_WP_MAJOR_VERSION
    in functions.php from that post as mqtranslate differs slightly, also line numbers are prob outdated as there were Yoast updates since but the same code still works.

    If you are struggling still I can make a zip of my yoast plugin.

  13. leslierad
    Member
    Posted 1 year ago #

    Here:

    http://ge.tt/5UoiPEg1/v/0?c my modded version of Version 1.5.2.8

    Note: This version will only work if you use the format /en /de etc. as it does some changes to sitemaps, but should work if you disable yoast sitemaps and use another sitemap tool.

    Need to change:

    class-sitemaps.php (wordpress-seo/inc/)
    change winallpoker to your sites name then add/remove languages as needed to the code that follows there are 3 instances you need to modify.

    $url = str_replace("yoursite.com/", "yoursite.com/da/", $url);

    also your functions.php
    should have

    // Enable qTranslate for WordPress SEO
        if(defined("QT_MAX_SUPPORTED_WP_MAJOR_VERSION")) {
        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);
        add_filter('pop_most_viewed_content', 'qtranslate_filter', 10, 1);
        }

    and

    function wpseo_qtranslate4($post_content) {
    if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) $post_content = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post_content);
    return $post_content;
    }
    add_filter('wpseo_heading_title4', 'wpseo_qtranslate4');
  14. somesh01
    Member
    Posted 1 year ago #

    @ lesierad,

    I don't know if i want to change or not I am just tired to always have problems between Qtranslate and Yoast. Anyway I will try the first thing you suggest me to do: change QT_SUPPORTED_WP_VERSION to QT_MAX_SUPPORTED_WP_MAJOR_VERSION

    I cannot know because I cannot see my website for a server problem!
    I will let you know and then I will try with your other suggestions, thank you very much. Probable I will have to ask you again, if the first option is not working because I am not so good with this technical stuff.

    Thank you!

  15. leslierad
    Member
    Posted 1 year ago #

    Well if you still have QT_SUPPORTED_WP_VERSION in functions.php and you are using mqtranslate yoast will not work I'm 100% sure about that.

    Feel free to ask, I added that zip file as its already done, just minor edits needed that you can do in notepad if you like.

    But you definitely need to change your functions.php

  16. somesh01
    Member
    Posted 1 year ago #

    @ leslierad,

    I cannot see it unfortunatly, but Yoast is working, the only problem is that if i put "[:en] ...[:it] ..." in the meta description they desappear!!!! The title and the seo keywords are ok, but the meta description not! How is it possible? For the rest yoast is working very well!

  17. leslierad
    Member
    Posted 1 year ago #

    Can you see your functions.php file ?

    These filters should be in it for yoast to work
    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);

    If like me you have/had
    if(defined("QT_SUPPORTED_WP_VERSION")) {

    before the filters then they will not work
    mqtranslate changed the code to QT_MAX_SUPPORTED_WP_MAJOR_VERSION

  18. somesh01
    Member
    Posted 1 year ago #

    @ leslierad,

    I cannot check right now because unfortunatly my server is not working and I cannot go to my website. Thank you for your support, I hope that tomorrow I can do that and I will check what you said. To check what you say and make the change you say, do I have to go into qtranslate code or in an other section of the website?

  19. leslierad
    Member
    Posted 1 year ago #

    You need to ftp to your server or use cpanel or how you usually edit files.

    Find functions.php, if your theme has one, it should be in /wp-content/themes/yourthemename/functions.php

    Or you should be able to access it from wordpress backend:
    dashboard - appearance - editor; make sure your theme is selected; then click functions.php in the list on the right.

    See if you have those filters and if maybe you have if(defined("QT_SUPPORTED_WP_VERSION")) {

    Then make the changes and see how it works, let me know after that.

  20. somesh01
    Member
    Posted 1 year ago #

    thank you! I really appreciate, I will let you know!

  21. somesh01
    Member
    Posted 1 year ago #

    @ leslierad,

    Today I can access my website. I couldn't find a file called function.php, what I have on the side bar are different files like: admin-framework.php or admin-natty.php etc.

    I tried to find "if(defined("QT_SUPPORTED_WP_VERSION")) {"
    But I cannot find it. Maybe because QTranslate is disabled and I have enabled MQTranslate?

    it is weird what I have! I can use the same trick of [:en]...[:it] for seo keywords and seo title but It desappear fro metadescription!!?? Do you have any suggestion?

    thank you

  22. leslierad
    Member
    Posted 1 year ago #

    what theme do you use?

  23. leslierad
    Member
    Posted 1 year ago #

    Also try edit:

    \wordpress-seo\js\wp-seo-metabox.js

    replace: var desc = jQuery.trim(yst_clean(descElm.val()));
    with: var desc = jQuery.trim(descElm.val());

    then save wp-seo-metabox.js as wp-seo-metabox.min.js

    OR download the zip file I sent earlier and copy whats in \wordpress-seo\js\wp-seo-metabox.min.js and save it over your version.

  24. somesh01
    Member
    Posted 1 year ago #

    Hi,

    I use Delicate as theme.

    sorry but where Can i find "\wordpress-seo\js\wp-seo-metabox.js"?

  25. leslierad
    Member
    Posted 1 year ago #

    \wp-content\plugins\wordpress-seo\js\wp-seo-metabox.js

    OR
    http://codex.wordpress.org/Plugins_Editor_Screen

  26. leslierad
    Member
    Posted 1 year ago #

    From the WordPress dashboard
    On the left side menu

    hover over plugins click on editor.

    At the top of the page has a drop down (select plugin to edit)
    Find wordpress SEO on the list select it press select button just to the right.

    Then a list of Plugin files shows on the left side
    scroll down until you find \wordpress-seo\js\wp-seo-metabox.js
    (6th file from the bottom)

    Click on it

    Find (ctrl+F in browser)

    var desc = jQuery.trim(yst_clean(descElm.val()));

    Replace it with

    var desc = jQuery.trim(descElm.val());

    Then click update file, and test if you descriptions now work.

    You may need to test with another browser or refresh or clear the browser cache.

  27. somesh01
    Member
    Posted 1 year ago #

    thank you very clear! Now I cannot do it but in the next days I will try! thank you very much you are very nice, I appreciate!

  28. leslierad
    Member
    Posted 1 year ago #

    I just tried with your theme and it does strip the tags out from description, my theme doesn't do the same, so don't bother with the above fix it will not work with your theme.

    I will have a look later when I get a chance to see if I can get it working.

  29. leslierad
    Member
    Posted 1 year ago #

    Haha I just said that refreshed the page and it works !!!

    You need to do all the changes I suggested to make it work, pretty complex for you I guess.

    You will need to add to
    Delicate: Theme Functions (functions.php)

    You do have it under appearance / editor
    Theme Functions (functions.php)

    // Enable qTranslate for WordPress SEO
        if(defined("QT_MAX_SUPPORTED_WP_MAJOR_VERSION")) {
        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);
        add_filter('pop_most_viewed_content', 'qtranslate_filter', 10, 1);
        }
    function wpseo_qtranslate4($post_content) {
    if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) $post_content = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post_content);
    return $post_content;
    }

    Then download the zip http://ge.tt/5UoiPEg1/v/0?c I made and overwrite your wp-seo plugin folder with what is there. it does work, I just tested it but forgot to refresh my browser.

  30. somesh01
    Member
    Posted 1 year ago #

    Hi lesierad,

    I am sorry but I am getting confused.

    Do I have to do just what you wrote on your last post? Or do I have to do also what you wrote in other posts? If yes, what exactly?

    If it is just what you wrote above, I am able to go to Theme Functions (functions.php) but then? Do I have to add all what you wrote at the end of it or at the beginning? I can do that but then I don't understand the next step that you suggest me to do it: "Then download the zip http://ge.tt/5UoiPEg1/v/0?c I made and overwrite your wp-seo plugin folder with what is there. it does work, I just tested it but forgot to refresh my browser. "

    After that I dowload your file, what exactly do I have to do with that?

    Sorry I am not an expert!
    And thank you for your support, I really appreciate!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • mqTranslate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic