WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using _n() with argument swapping for translation (2 posts)

  1. r-a-y
    Member
    Posted 3 years ago #

    On the translation page for developers:
    http://codex.wordpress.org/I18n_for_WordPress_Developers

    The page lists how to use the plural form with _n(), however what if I want to use _n() and argument swapping?

    eg. This is the normal usage of _n():

    printf( _n( "You have written %d comment", "You have written %d comments", $count, 'my-plugin' ), $count );

    What if I wanted to swap out the "You" for another variable like the user_login?

  2. r-a-y
    Member
    Posted 3 years ago #

    Okay, needed some fresh air!
    Resolved!

Topic Closed

This topic has been closed to new replies.

About this Topic