[wp-trac] [WordPress Trac] #17268: Use native gettext library when available

WordPress Trac noreply at wordpress.org
Mon Jun 27 07:35:49 UTC 2022

#17268: Use native gettext library when available
 Reporter:  linushoppe                           |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.1
Component:  I18N                                 |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-refresh needs-unit-  |     Focuses:
  tests dev-feedback                             |  performance

Comment (by Mte90):

 Hi, this is a good news, but until I don't see any real further action I
 don't believe that this change will be implemented.

 As it is now my old patches are kind of useless after all those years also
 because in the meantime there are various implementation that improve
 differently this change.

 I moved the discussion to the performance team with a github ticket

 So to me, the next steps to take:

 * Define what library/implementation use
 * Integrate in WP
 * Test the test suite (years ago this was one of the issues, as there are
 tests specific for our implementation that aren't gettext standard)

 Looking also the PHP-FIG started discussing a standard (I am in the
 Discord server) about localization files but there isn't anything more
 about it.
 We have to remember that https://konstantin.blog/2021/php-benchmark-
 include-vs-file_get_contents/ for performance reasons is more fast to read
 files from HDD/SSD but our big issue is that we have to parse a binary
 file by PHP at every page requests multiplied for any language file.

 So probably a solution that save it using object cache or generating
 PHP/JSON files it is better and more similar to other PHP frameworks.

 In conclusion, this is a work that require more than 1 single person
 discussing (not on this ticket that has a bigger history) and doing some
 benchmark and tests (that is the reason why I abandoned the working on

Ticket URL: <https://core.trac.wordpress.org/ticket/17268#comment:105>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list