• Resolved Yulian

    (@fingli)


    I’m the author of RedLine theme. I decided to make my theme translatable and it almost done but I came across with a string which I don’t know how to set. So I need an advice how to deal with it.
    Here it is the whole function

    function framework_discussion_rss() {
    	global $id;
    	$uri = get_post_comments_feed_link( $id );
    	$text = "<p class=\"comment-feed-link\">You can follow all the replies to this entry through the <a href=\"{$uri}\">comments</a> feed.</p>";
    	echo $text;
    }

    The translatable phrase is in $text. Into the browser it should look like this: You can follow all the replies to this entry through the comments feed.

    Thanks in advance for any help or advice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think something like:

    $text = "<p class=\"comment-feed-link\">" . __('You can follow all the replies to this entry through the', 'domain') . "<a href=\"{$uri}\">" . __('comments', 'domain) . "</a> . __('feed.', 'domain') ."</p>";

    should work. Note that there are two underscores before each translatable string.

    Thread Starter Yulian

    (@fingli)

    Great! It works as I wanted. Thanks esmi!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I18n WP theme: advice needed’ is closed to new replies.