[wp-trac] [WordPress Trac] #23311: Enable internationalization in PHPMailer

WordPress Trac noreply at wordpress.org
Sat Feb 2 20:58:12 UTC 2013


#23311: Enable internationalization in PHPMailer
-----------------------------------+------------------
 Reporter:  iandunn                |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  3.6
Component:  I18N                   |     Version:  3.5
 Severity:  minor                  |  Resolution:
 Keywords:  has-patch needs-codex  |
-----------------------------------+------------------
Changes (by nacin):

 * milestone:  Awaiting Review => 3.6


Comment:

 What we can do instead is add every string in PHPMailer::SetLanguage to
 the WordPress POT file, so it may be translated like any other string in
 WordPress.

 Then, we can set $phpmailer->language directly, with our own strings.

 As $phpmailer->language is protected, it would probably make the most
 sense to actually extend PHPMailer and create a WP_PHPMailer class.

 Unit tests should then test that we are not missing any strings in
 WP_PHPMailer that are present in a potential future version of PHPMailer,
 by confirming that the keys returned by PHPMailer::GetTranslations() line
 up.

 Or, to involve upstream, we can submit a change upstream to allow for the
 language strings to be set from an array, rather than from a PHP file.
 Then implement that change downstream and leverage it here. I would not be
 surprised, though, if the comment from upstream is to simply extend
 PHPMailer.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23311#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list