Changes between Initial Version and Version 1 of Ticket #60554
- Timestamp:
- 02/16/2024 10:31:29 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #60554 – Description
initial v1 1 1 In WordPress 6.5 we're adding support for PHP translation files. They still require accompanying `.mo` and `.po` files. However, it doesn't have to be this way! 2 3 It should be possible for projects (plugins, themes, and core) to only use `.l10n.php` files. 2 4 3 5 A few areas that would need changing: 4 6 5 ** `wp_get_installed_translations()`**7 **wp_get_installed_translations()** 6 8 7 9 `wp_get_installed_translations()` is used for getting the list of installed translations for plugins/themes/core when updating language packs and also when uninstalling plugins/themes (to remove the translations again). 8 10 9 ** `Language_Pack_Upgrader`**11 **Language_Pack_Upgrader** 10 12 11 13 `\Language_Pack_Upgrader::check_package()` checks whether there are `.mo` and `.po` in the language pack. It should also support language packs with only a `.l10n.php` file. 14 15 **load_textdomain() / load_default_textdomain()** 16 17 Not sure about this one. 18 19 Right now you can pass an `.mo` file path, even though the file doesn't exist, and WordPress will load the `.l10n.php` counterpart. So technically no change is required. However, what if you want to directly pass an `.l10n.php` file path instead?