[wp-trac] [WordPress Trac] #29783: User Admin Language
WordPress Trac
noreply at wordpress.org
Wed Sep 7 16:30:57 UTC 2016
#29783: User Admin Language
-------------------------------------------------+-------------------------
Reporter: faevilangel | Owner: ocean90
Type: feature request | Status: assigned
Priority: normal | Milestone: Future
Component: I18N | Release
Severity: normal | Version: 4.0
Keywords: has-patch 2nd-opinion has-unit- | Resolution:
tests | Focuses:
| administration
-------------------------------------------------+-------------------------
Comment (by ocean90):
Replying to [comment:36 swissspidy]:
> Looks like `$locale = get_locale();` in `options-general.php` needs to
be `$locale = get_option('WPLANG');`, otherwise the user locale will
always be selected.
See #31318 why we can't do that.
To workaround polluting the global `$locale` we can leave the
`get_locale()` call:
{{{
$locale = get_locale();
$user_locale = get_user_locale();
$locale_file = WP_LANG_DIR . "/$user_locale.php";
if ( ( 0 === validate_file( $user_locale ) ) && is_readable( $locale_file
) )
require( $locale_file );
unset( $locale_file, $user_locale );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29783#comment:37>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list