[wp-trac] [WordPress Trac] #49971: Add get_admin_locale() that is separate from WPLANG / get_locale() / get_user_locale()

WordPress Trac noreply at wordpress.org
Wed Apr 22 14:22:53 UTC 2020


#49971: Add get_admin_locale() that is separate from WPLANG / get_locale() /
get_user_locale()
-----------------------------+--------------------------------------
 Reporter:  apedog           |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  I18N             |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  ui, rtl, administration
-----------------------------+--------------------------------------

Comment (by apedog):

 Thanks :)
 Plugins are a partial solution. They basically do what
 {{{get_user_locale()}}} provides natively. They're not much use since
 WordPress 4.7.

 For example, they cannot help when ''other'' plugins use
 {{{determine_locale()}}} to generate text/logs. Especially if those other
 plugins don't operate with {{{user_logged_in}}} so they default to
 {{{WPLANG}}}

 A recent example I had is Easy Updates Manager plugin that logs automatic
 updates (so no {{{user_locale}}}). Some of the updated plugins have
 translation strings and some don't - resulting in a mixed LTR/RTL report.
 There is no obvious way to tell EUM plugin ''NOT'' to use site locale when
 generating the report.

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


More information about the wp-trac mailing list