WordPress at a glance
function is not described

restore_current_locale() WP 4.7.0

Restores the translations according to the original locale.

No Hooks.

Return

String|false. Locale on success, false on error.

Usage

restore_current_locale();

Notes

  • Global. WP_Locale_Switcher. $wp_locale_switcher WordPress locale switcher object.

Changelog

Since 4.7.0 Introduced.

Code of restore_current_locale() WP 5.7.2

<?php
function restore_current_locale() {
	/* @var WP_Locale_Switcher $wp_locale_switcher */
	global $wp_locale_switcher;

	return $wp_locale_switcher->restore_current_locale();
}