[resolved] mqTranslate not working in widgets (6 posts)

  1. bublelicious
    Posted 3 years ago #

    I am using the latest version of wordpress and the Di'verso theme by "Your Inspiration Themes" and I am using mQtranslate to make it multilingual. I am having problems getting the text in the widgets translated. I insert the correct <!-- --> code to enclose the different language translation, but as soon as I save, wordpress strips the tags out and just joins the two translations together so if I write <!--:en-->Calendar<!--:--><!--:it-->Calendario<!--:--> the display result on the page will be "CalendarCalendario".
    How do i solve this? Thank you!


  2. marujobhz
    Posted 2 years ago #

    hi, continuing this post... its possible to translate the widgets?
    tks, marujobhz

  3. chsxf
    Plugin Author

    Posted 2 years ago #

    We will see how this is possible to translate widgets.

    Do not expect this feature to appear in the upcoming update for WP 3.8 but maybe in the one after.

  4. chsxf
    Plugin Author

    Posted 2 years ago #

    After some investigation, it appeared that qTranslate includes a widget translation support, so mqTranslate includes it also.

    You can use quicktags to specify different translations in your widgets.
    Example for a category widget title:
    [:fr]Mes Cat├ęgories[:en]My Categories

    However, for this to work, widgets titles and text elements must be filtered using the widget_title et widget_text filters. So it may not work with all widgets out of the box and source code may need some update to support translations.

  5. Goran Grudic
    Posted 2 years ago #

    I tried this and it works:
    [:en]My English Title[:fr]My French Title

  6. mtporter
    Posted 2 years ago #

    ah, perfect!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic