Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12103
    ITGuy9401
    Participant

    Hello,
    I found a problem with qTranslate X, when I putted on the Read Mode button (or any other button or the disclamer text) an internazionalized string (eg. [:en]Read More[:it]Maggiori informazioni[:] ) this is printed out as it is. I did a quickfix in the php of the plugin (I can post it entirely on pastebin or send it via email), the problem was when you have to print the html disclamer element, when you printed text, I wrapped the text in the function __($string).

    Before:
    ($options['see_more'] === 'yes' ? '<a href="' . ($options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] )) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['see_more_opt']['text'] . '</a>' : '')

    After:
    ($options['see_more'] === 'yes' ? '<a href="' . ($options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] )) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . __($options['see_more_opt']['text']) . '</a>' : '')

    #12107
    Bartosz
    Keymaster

    It can’t work like that as you cannot use __() function for dynamic strings. If qTranslate X does that it’s not correct in terms of WP guidelines.

    We don’t support qTranslate X basically, only Polylang(recommended) and WPML, but you can make translate strings using filter hooks – just take a look at the code for filter names.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.