I18N: Support loading .l10n.php translation files on their own.

Adjusts the translation file lookup in `WP_Textdomain_Registry` so that just-in-time translation loading
works even if there is only a `.l10n.php` translation file without a corresponding `.mo` file.

While language packs continue to contain both file types, this makes it easier to use translations in a project
without having to deal with `.mo` or `.po` files.

Props Chrystl.
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57516 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler
2024-02-01 19:03:55 +00:00
parent 67e9ffb9fd
commit 8d3e4a1eeb
7 changed files with 87 additions and 36 deletions

View File

@@ -0,0 +1,2 @@
<?php
return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=(n != 1);','messages'=>['This is a dummy plugin'=>'Das ist ein Dummy Plugin'],'language'=>'de_DE','x-generator'=>'Poedit 2.4.1'];

View File

@@ -0,0 +1,2 @@
<?php
return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=(n != 1);','messages'=>['This is a dummy plugin'=>'Este es un plugin dummy'],'language'=>'de_DE','x-generator'=>'Poedit 2.4.1'];