wordpress-develop/tests/phpunit/tests/l10n
Pascal Birchler bce2a0a534 I18N: Introduce switch_to_user_locale().
This new function makes it easier to switch to a specific user’s locale by reducing duplicate code and storing the user’s ID as additional context for plugins to consume. Existing usage of `switch_to_locale()` in core has been replaced with `switch_to_user_locale()` where appropriate.

Also, this change ensures `WP_Locale_Switcher` properly filters `determine_locale` so that anyyone using the `determine_locale()` function will get the correct locale information when switching is in effect.

Props costdev.
Fixes #57123.
See #26511.

git-svn-id: https://develop.svn.wordpress.org/trunk@55161 602fd350-edb4-49c9-b593-d223f7449a82
2023-01-30 10:25:53 +00:00
..
getLocale.php Build/Test Tools: Add @covers tags to the l10n and i18n tests. 2022-08-08 23:39:06 +00:00
getUserLocale.php Tests: Correctly use the factory method. 2022-09-06 22:03:10 +00:00
loadScriptTextdomain.php Code Modernization: Use correct default value for JavaScript translations path. 2022-09-28 17:31:53 +00:00
loadTextdomain.php I18N: Change how WP_Textdomain_Registry stores the default languages path. 2022-10-24 10:01:01 +00:00
loadTextdomainJustInTime.php I18N: Change how WP_Textdomain_Registry stores the default languages path. 2022-10-24 10:01:01 +00:00
translateSettingsUsingI18nSchema.php Build/Test Tools: Add @covers tags to the l10n and i18n tests. 2022-08-08 23:39:06 +00:00
wpLocaleSwitcher.php I18N: Introduce switch_to_user_locale(). 2023-01-30 10:25:53 +00:00
wpTextdomainRegistry.php I18N: Change how WP_Textdomain_Registry caches translation information. 2022-12-20 15:10:35 +00:00