WordPress.org

Forums

mqTranslate
[resolved] Add mqtranslate to other Fields of Pages? (6 posts)

  1. crobertou
    Member
    Posted 11 months ago #

    Hi, i need to add mqtranslate to other Fields of Pages?, my theme have varius fields but i put <!--:es-->Texto<!--:--><!--:en-->Text<!--:--> on the page show TextoText, please helpme, thanks!

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

  2. crobertou
    Member
    Posted 11 months ago #

    I resolved whit:
    esc_html(qtrans_use(qtrans_getLanguage(), $post->post_title, true));

    ;-)

  3. chsxf
    Member
    Plugin Author

    Posted 11 months ago #

    If you want to display specifically the post title or content, you should definetely use the_title() and the_content(). Those two functions are filtered by mqTranslate.

    For any other text, you can use the much simpler (but longer):
    qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage([YOUR_TRANSLATED_TEXT_OR_VARIABLE_HERE]);

  4. jff1
    Member
    Posted 11 months ago #

    Hello chsxf,
    I'm using mqtranslate for my website. I checked the box that says "Detect browser's langauge and redirect accordingly". The problem is that it is only effective with mobiles and tablets, not with computers. Could you tell me how can I solve this problem?
    Thank You!

  5. ginez_17
    Member
    Posted 11 months ago #

    Hi chsxf,

    How can I translate a title in widgets?

    I've tried the <!--:en-->Cart<!--:--><!--:it-->Carrello<!--:--> but it strips out the <!--:--> tags and shows both text options...

    Can you help?

    Many thanks,

    Ginestra

  6. albertostudium
    Member
    Posted 10 months ago #

    try like this:

    [:en]Cart[:it]carrello

Reply

You must log in to post.

About this Plugin

  • mqTranslate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic