WP_Locale_Switcher::change_locale

Private AccessPrivate Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

SummerySummery

Changes the site’s locale to the given one.

Syntax

WP_Locale_Switcher::change_locale( string $locale )

DescriptionDescription

Loads the translations, changes the global $wp_locale object and updates all post type labels.

ParametersParameters

$locale

(string) (Required) The locale to change to.

SourceSource

File: wp-includes/class-wp-locale-switcher.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top