REST API: Render response in user locale with `?_locale=user`.
Introduces new `determine_locale()` function for deciding the proper locale to use for a response. Default value is `get_user_locale()` in the admin, and `get_locale()` on the frontend. Because REST API requests are considered frontend requests, `?_locale=user` can be used to render the response in the user's locale. Also updates `wp-login.php?wp_lang` implementation to benefit from this abstraction. Merges [43776] from the 5.0 branch to trunk. Props flixos90, mnelson4, swissspidy, TimothyBlynJacobs. Fixes #44758. Built from https://develop.svn.wordpress.org/trunk@44134 git-svn-id: https://core.svn.wordpress.org/trunk@43964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Loading
Please register or sign in to comment