Make WordPress Core

Opened 5 years ago

Closed 21 months ago

Last modified 18 months ago

#38665 closed enhancement (fixed)

Add user language preference to 'Add new user' form

Reported by: barryceelen Owned by: johnbillion
Milestone: 5.5 Priority: normal
Severity: normal Version: 4.7
Component: Users Keywords: needs-testing has-patch
Focuses: administration Cc:


Existing users can select an admin language. Perhaps allow preselecting a language on the user edit screen may be helpful.

Attachments (3)

38665.diff (2.4 KB) - added by barryceelen 5 years ago.
38665.2.diff (2.8 KB) - added by johnbillion 2 years ago.
38665.3.diff (1003 bytes) - added by johnbillion 22 months ago.

Download all attachments as: .zip

Change History (23)

#1 @johnbillion
5 years ago

  • Keywords needs-patch added

Makes sense. We did the same thing for sites in #33528.

This ticket was mentioned in Slack in #core by johnbillion. View the logs.

5 years ago

#3 @ocean90
5 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from feature request to enhancement

5 years ago

#4 @barryceelen
5 years ago

  • Keywords has-patch added; needs-patch removed

38665.diff adds the language dropdown to the 'Add User' form.

Setting $user->locale is moved outside of the $update conditional.
Also removes setting $user->locale = ''. Unsure why that was there in the first place?

The language select is only shown if !is_multisite(). Is that correct?

Last edited 5 years ago by barryceelen (previous) (diff)

#5 @johnbillion
5 years ago

  • Focuses administration added
  • Keywords needs-testing added

Need to consider that there's also the ability to add a user to a site from the Network Admin -> Sites -> Edit -> Users screen.

#6 @desrosj
3 years ago

  • Keywords needs-refresh added

The most recent patch needs to be refreshed.

#7 @johnbillion
2 years ago

  • Keywords needs-testing removed
  • Milestone changed from Future Release to 5.5
  • Owner set to johnbillion
  • Status changed from new to reviewing

2 years ago

#8 @johnbillion
2 years ago

  • Keywords needs-refresh removed

Updated the patch with changes which means the UI and behaviour of the dropdown now matches that of the one used when editing a user.

#9 @johnbillion
2 years ago

Confirmed that the welcome email sent to the user is sent in their own language.

#10 @johnbillion
22 months ago

  • Component changed from I18N to Users

#11 @johnbillion
22 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47516:

Users: Add a user language preference option to the "Add New User" form.

This uses the same language selection control as the user editing screen and allows new users to be invited to a site in their own language.

Props barryceelen, johnbillion

Fixes #38665

#12 @SergeyBiryukov
22 months ago

In 47519:

Coding Standards: Fix WPCS issues in [47516].

See #38665.

#13 @SergeyBiryukov
22 months ago

In 47520:

Coding Standards: Remove some extra tabs in wp-admin/user-new.php.

Follow-up to [47516], [47519].

See #38665.

#14 @johnbillion
22 months ago

  • Keywords needs-dev-note added

#15 @johnbillion
22 months ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This has broken the ability for the user to change their language from the user profile editing screen. $user->locale always gets set to an empty string.

#16 @johnbillion
22 months ago

  • Keywords needs-testing added

#17 @johnbillion
22 months ago

  • Keywords has-patch added; needs-patch removed

#18 @afercia
21 months ago

Looking at 38665.3.diff, I'd like to suggest to add an inline comment where $user->locale is set to empty string. That may help avoid the same mistake in the future, as it's not immediately clear why it's needed. See

Also removes setting $user->locale = . Unsure why that was there in the first place?

#19 @johnbillion
21 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

[47739] missed this ticket.

#20 @johnbillion
18 months ago

  • Keywords needs-dev-note removed
Note: See TracTickets for help on using tickets.