Pascal Birchler 66d85f381e I18N: Refactor determine_locale() for performance and readability.
Refactors the function to avoid unnecessary `get_locale()` calls and slightly improve performance, while keeping it readable.

Adds tests.

Props Cybr, spacedmonkey, swissspidy.
Fixes #58317.

git-svn-id: https://develop.svn.wordpress.org/trunk@55862 602fd350-edb4-49c9-b593-d223f7449a82
2023-05-26 17:55:40 +00:00
..