How to handle text with function __(?

I cannot find the reference for hard answer on this, but likely it can handle large strings just fine. From quick look at WP’s own files somethings like this:

__('Your account has been activated. You may now <a href="https://wordpress.stackexchange.com/questions/174179/%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.')

is stored as multiple lines in PO:

#: wp-activate.php:96
msgid ""
"Your account has been activated. You may now <a href=\"%1$s\">log in</a> to "
"the site using your chosen username of &#8220;%2$s&#8221;. Please check your "
"email inbox at %3$s for your password and login instructions. If you do not "
"receive an email, please check your junk or spam folder. If you still do not "
"receive an email within an hour, you can <a href=\"%4$s\">reset your "
"password</a>."

So it seems inherently aware and suitable for handling large strings.

Leave a Comment