restore_previous_locale

Restores the translations according to the previous locale.

Description

(string|false) restore_previous_locale(); 

Returns (string|false)

Locale on success, false on error.


Usage

  1. if ( !function_exists( 'restore_previous_locale' ) ) { 
  2. require_once ABSPATH . WPINC . '/l10n.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = restore_previous_locale(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/l10n.php  
  1. function restore_previous_locale() { 
  2. /** @var WP_Locale_Switcher $wp_locale_switcher */ 
  3. global $wp_locale_switcher; 
  4.  
  5. return $wp_locale_switcher->restore_previous_locale();