[wp-trac] [WordPress Trac] #37539: translate_user_role only working in admin
WordPress Trac
noreply at wordpress.org
Mon Aug 1 16:03:20 UTC 2016
#37539: translate_user_role only working in admin
-------------------------+-----------------------------
Reporter: keraweb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: I18N | Version: 4.0
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+-----------------------------
Comment (by keraweb):
Not only that.
The default .mo files for the front-end doesn't contain the role
translations at all.
Found a workaround:
{{{#!php
add_action( 'init', 'load_admin_textdomain_in_front' )
function load_admin_textdomain_in_front() {
if ( ! is_admin() ) {
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale()
. '.mo' );
}
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37539#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list