title: Using sprinft() with nested variables - how?
body: <p>I'm trying to translate WordPress website using <code>gettext()</code>. Documentation says this:</p>
  
  <blockquote>
    <p>Use format strings instead of string concatenation —<code>sprintf(__('Replace %1$s with %2$s'), $a, $b);</code> is always better than <code>__('Replace').$a.__(' with ').$b;</code></p>
  </blockquote>
  
  <p>I want to follow this advice but here comes the problem:</p>
  
  <pre><code>&lt;?php _e('You must be', 'textdomain'); ?&gt; 
      &lt;a href="&lt;?php bloginfo('url'); ?&gt;/wp-login.php?redirect_to=&lt;?php the_permalink(); ?&gt;"&gt;
          &lt;?php _e('logged in', 'textdomain'); ?&gt;
      &lt;/a&gt; 
  &lt;?php _e('to post a comment.', 'textdomain'); ?&gt;
  </code></pre>
  
  <p>This would either require some nested <code>sprintf()</code> or I would have to leave it like that - split into 3 strings (or at least 2). I'm not PHP expert, so if someone knows a way to get around this I would appreciate it.</p>