restore_current_locale

Restores the translations according to the original locale.

Description

(string|false) restore_current_locale(); 

Returns (string|false)

Locale on success, false on error.


Usage

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

Defined (1)

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

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