[wp-trac] [WordPress Trac] #29783: User Admin Language

WordPress Trac noreply at wordpress.org
Thu Sep 8 10:23:20 UTC 2016


#29783: User Admin Language
--------------------------------------+-----------------------------
 Reporter:  faevilangel               |       Owner:  ocean90
     Type:  feature request           |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.7
Component:  I18N                      |     Version:  4.0
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  administration
--------------------------------------+-----------------------------
Changes (by swissspidy):

 * keywords:  has-patch 2nd-opinion has-unit-tests => has-patch has-unit-
               tests


Comment:

 In [attachment:29783.3.diff]:

 * Remove `is_admin()` check in `get_user_locale()`
 * Move `is_admin()` check to `load_default_textdomain()` so the admin is
 always in the user's locale by default
 * Loads `{$locale}.php` for both the site locale and the user locale. (Not
 100% sure about this one).
 * Adjusts tests.

 [attachment:user-language-admin-toolbar.php] is a proof-of-concept plugin
 that, when applying the patch from #26511, changes the toolbar language
 depending on the user's locale, but keeps the rest of the site in the
 site's locale. See
 https://twitter.com/swissspidy/status/773571032963751936 for a screenshot.
 For sending emails etc. this can be done similarly.

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


More information about the wp-trac mailing list