restore_current_locale()
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. |
restore_current_locale() restore current locale code WP 6.5.2
function restore_current_locale() { /* @var WP_Locale_Switcher $wp_locale_switcher */ global $wp_locale_switcher; if ( ! $wp_locale_switcher ) { return false; } return $wp_locale_switcher->restore_current_locale(); }