WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 4 months ago

#47376 closed enhancement (fixed)

Display the logged out message in the user's locale

Reported by: johnbillion Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.9
Component: I18N Keywords: has-patch has-screenshots
Focuses: Cc:
PR Number:

Description (last modified by johnbillion)

When a user is using a language other than the site default and they log out, they're shown the "You are now logged out" message in the site's language, not their selected language.

The simple fix for this is to add a wp_lang query variable to the URL that the user is redirected to after they've been logged out.

Related: #43700

Attachments (2)

47376.diff (487 bytes) - added by johnbillion 6 months ago.
logout.png (72.1 KB) - added by mukesh27 6 months ago.

Download all attachments as: .zip

Change History (9)

@johnbillion
6 months ago

#1 @johnbillion
6 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

#2 @johnbillion
6 months ago

  • Description modified (diff)

#3 @mukesh27
6 months ago

@johnbillion i do test attached patch for Gujarati language and get empty value for wp_lang

When i click logout system will show http://localhost/wordpress/wp-login.php?loggedout=true&wp_lang= url without lang attribute value.

Any other setting needed to test above patch?

@mukesh27
6 months ago

#4 @mukesh27
6 months ago

  • Keywords has-screenshots added

#5 @johnbillion
6 months ago

@mukesh27 Thanks for testing! Does your user account have a language other than the site default selected in the Profile screen?

#6 @mukesh27
6 months ago

  • Keywords needs-testing removed

@johnbillion it is working fine when i set user profile language but when i select site language it was not working.

Is above working when we select use profile am i right?

#7 @ocean90
4 months ago

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

Looks like my commit message got truncated…

Committed in [45690] with props for @mukesh27 for the initial patch.

Note: See TracTickets for help on using tickets.