[wp-trac] [WordPress Trac] #44758: The REST API is not respecting the user's locale properly.

WordPress Trac noreply at wordpress.org
Fri Oct 19 10:43:49 UTC 2018


#44758: The REST API is not respecting the user's locale properly.
-------------------------------------------------+-------------------------
 Reporter:  youknowriad                          |       Owner:  pento
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.0
Component:  REST API                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion has-patch has-unit-      |     Focuses:  rest-api
  tests dev-feedback                             |
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 I added support for locale switching on the login page in
 [attachment:"44758.3.diff"]. I also added a filter that perhaps needs a
 better name.

 Not sure if the `wp_lang` part needs some additional sanitization by
 checking if the locale is part of `get_available_languages()` (or equals
 `en_US`)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44758#comment:37>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list