[wp-trac] [WordPress Trac] #59656: Merge Performant Translations (Ginger MO)

WordPress Trac noreply at wordpress.org
Tue Jan 23 13:32:49 UTC 2024


#59656: Merge Performant Translations (Ginger MO)
--------------------------------------+--------------------------
 Reporter:  swissspidy                |       Owner:  swissspidy
     Type:  enhancement               |      Status:  closed
 Priority:  high                      |   Milestone:  6.5
Component:  I18N                      |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by swissspidy):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"57337" 57337]:
 {{{
 #!CommitTicketReference repository="" revision="57337"
 I18N: Introduce a more performant localization library.

 This introduces a more lightweight library for loading `.mo` translation
 files which offers increased speed and lower memory usage.
 It also supports loading multiple locales at the same time, which makes
 locale switching faster too.

 For plugins interacting with the `$l10n` global variable in core, a shim
 is added to retain backward compatibility with the existing `pomo`
 library.

 In addition to that, this library supports translations contained in PHP
 files, avoiding a binary file format and leveraging OPCache if available.
 If an `.mo` translation file has a corresponding `.l10n.php` file, the
 latter will be loaded instead.
 This behavior can be adjusted using the new `translation_file_format` and
 `load_translation_file` filters.

 PHP translation files will be typically created by downloading language
 packs, but can also be generated by plugins.
 See https://make.wordpress.org/core/2023/11/08/merging-performant-
 translations-into-core/ for more context.

 Props dd32, swissspidy, flixos90, joemcgill, westonruter, akirk,
 SergeyBiryukov.
 Fixes #59656.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59656#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list