WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Comments title won't localize on my custom theme

[Resolved] Comments title won't localize on my custom theme

  • Iva

    @supersonicsquirrel

    I have copied the title from twentyleven, replaced the text domain with my own and nothing is happening. The .po generator does not recognise this and therefore I cannot translate it.

    <?php
    				printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'gpk2' ),
    					number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
    			?>

    I’m wondering if I’m missing something fairly obvious. Thank you.

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

    @josh401

    Moderator and Editor Customizer

    I don’t think printf() gets picked up by POEdit. I think it only picks up strings with __() or _e().

    However, you might be able to add it to the list?

    Iva

    @supersonicsquirrel

    Thank you! 🙂 I have searched for a bit and found this:

    http://wp.tutsplus.com/tutorials/theme-development/translating-your-theme/

    However, their explanation of paths is pretty vague – it did not work until I entered the regular C:\Users\MY NAME\Desktop\gpk2\lang\

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Comments title won't localize on my custom theme’ is closed to new replies.
Skip to toolbar