Externalize get_project_locale_from_request() function