switch_to_locale() – Switches the translations according to the given locale.

You appear to be a bot. Output may be restricted

Description

Switches the translations according to the given locale.

Usage

$bool = switch_to_locale( $locale );

Parameters

$locale
( string ) required – The locale.

Returns

bool True on success, false on failure.

Source

File name: wordpress/wp-includes/l10n.php
Lines:

1 to 6 of 6
function switch_to_locale( $locale ) {
  /* @var WP_Locale_Switcher $wp_locale_switcher */
  global $wp_locale_switcher;

  return $wp_locale_switcher->switch_to_locale( $locale );
}
 

 View on GitHub View on Trac