Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ok, solved this.
    Here’s how I solved it.

    Changed the above listed lines as follows:

    #: comments.php:64
    msgid "You must be <a href=\"%s\">logged in</a> to post a comment."
    msgstr "Du musst <a href=\"%s\">angemeldet</a> sein, um einen Kommentar abzugeben."

    Also, I changed line 67 in comments.php of the pyrmontv2 theme.
    Original:

    <p><?php _e('You must be <a href="<?php echo get_option(\'siteurl\'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.','pyrmont_v2');?></p>

    New:

    <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.','pyrmont_v2'),
    	get_option('siteurl') . "/wp-login.php?redirect_to=" . urlencode(get_permalink()));?></p>

    After changing a .po file you need to compile it to a .mo file. There are various tools to do this.

    Did you find a solution to this issue?

    I am facing the same problem. The trouble seems to be that there’s some PHP code in the text to be translated. Here’s an excerpt of de_DE.po:

    #: comments.php:64
    
    msgid "You must be <a href=\"<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>\">logged in</a> to post a comment."
    
    msgstr "Du musst <a href=\"<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>\">angemeldet</a> sein, um einen Kommentar abzugeben."

Viewing 2 replies - 1 through 2 (of 2 total)