WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
Change picture when change language? (2 posts)

  1. Sikth
    Member
    Posted 1 year ago #

    Hi!
    Under my logo, there is a text, so I have two different logos in both languages. Can this be changed with the language?

    <?php _e("<!--:en--><img src="http://webpage.se/wp-content/uploads/2012/11/loggo3.png" alt="Logo" style="width: 300px;"><!--:--><!--:sv--><img src="http://webpage.se/wp-content/uploads/2012/11/loggo2.png" alt="Logo" style="width: 300px;"><!--:-->"); ?>

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

    This returns an error, maybe you read with a sight :) hehe

    Any idea?
    Thanks!

    http://wordpress.org/extend/plugins/qtranslate/

  2. petehobo
    Member
    Posted 1 year ago #

    I haven't tested, but I think that approach should work. I think your problem is that you have quotes inside your string. The easiest fix would be to replace the outside quotes with single quotes, like this:

    <?php _e('<!--:en--><img src="http://webpage.se/wp-content/uploads/2012/11/loggo3.png" alt="Logo" style="width: 300px;"><!--:--><!--:sv--><img src="http://webpage.se/wp-content/uploads/2012/11/loggo2.png" alt="Logo" style="width: 300px;"><!--:-->'); ?>

    Otherwise, you'll need to escape all the inner quotes, eg

    <?php _e("<!--:en--><img src=\"http://webpage.se/wp-content/uploads/2012/11/loggo3.png\" alt=\"Logo\" style=\"width: 300px;\"><!--:--><!--:sv--><img src=\"http://webpage.se/wp-content/uploads/2012/11/loggo2.png\" alt=\"Logo\" style=\"width: 300px;\"><!--:-->"); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.