Skip to content
  • Log In
  • Register
WordPress.org
  • News
  • Download & Extend
    • Get WordPress
    • Themes
    • Patterns
    • Plugins
    • Openverse
    • Mobile
    • Hosting
  • Learn
    • Learn WordPress
    • Documentation
    • Forums
    • WordPress.tv
    • Developers
  • Community
    • Make WordPress
    • WordCamp
    • Meetups
    • Photo Directory
    • Job Board
    • Five for the Future
  • About
    • About WordPress
    • Showcase
    • Gutenberg
    • Enterprise
    • WordPress Swag Store
  • Get WordPress
Get WordPress

Developer Resources

Browse: Home / Reference / wp-includes/class-wp-locale-switcher.php

WP_Locale_Switcher::change_locale()

Method: Changes the site’s locale to the given one.

Source: wp-includes/class-wp-locale-switcher.php:224

Used by 2 functions | Uses 3 functions

change_locale

Action Hook: Fires when the locale is switched to or restored.

Source: wp-includes/class-wp-locale-switcher.php:238

Used by 1 function | Uses 0 functions

WP_Locale_Switcher::filter_locale()

Method: Filters the locale of the WordPress installation.

Source: wp-includes/class-wp-locale-switcher.php:171

Used by 0 functions | Uses 0 functions

WP_Locale_Switcher::load_translations()

Method: Load translations for a given locale.

Source: wp-includes/class-wp-locale-switcher.php:192

Used by 1 function | Uses 3 functions

WP_Locale_Switcher::switch_to_locale()

Method: Switches the translations according to the given locale.

Source: wp-includes/class-wp-locale-switcher.php:72

Used by 1 function | Uses 3 functions

switch_locale

Action Hook: Fires when the locale is switched.

Source: wp-includes/class-wp-locale-switcher.php:93

Used by 1 function | Uses 0 functions

WP_Locale_Switcher::restore_previous_locale()

Method: Restores the translations according to the previous locale.

Source: wp-includes/class-wp-locale-switcher.php:105

Used by 2 functions | Uses 2 functions

restore_previous_locale

Action Hook: Fires when the locale is restored to the previous one.

Source: wp-includes/class-wp-locale-switcher.php:130

Used by 1 function | Uses 0 functions

WP_Locale_Switcher::restore_current_locale()

Method: Restores the translations according to the original locale.

Source: wp-includes/class-wp-locale-switcher.php:142

Used by 1 function | Uses 1 function

WP_Locale_Switcher::is_switched()

Method: Whether switch_to_locale() is in effect.

Source: wp-includes/class-wp-locale-switcher.php:159

Used by 1 function | Uses 0 functions

WP_Locale_Switcher

Class: Core class used for switching locales.

Source: wp-includes/class-wp-locale-switcher.php:16

Used by 0 functions | Uses 0 functions

WP_Locale_Switcher::__construct()

Method: Constructor.

Source: wp-includes/class-wp-locale-switcher.php:48

Used by 0 functions | Uses 2 functions

WP_Locale_Switcher::init()

Method: Initializes the locale switcher.

Source: wp-includes/class-wp-locale-switcher.php:60

Used by 0 functions | Uses 1 function
  • About
  • News
  • Hosting
  • Donate
  • Swag
  • Documentation
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • Patterns
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our Twitter account
  • Visit our Instagram account
  • Visit our LinkedIn account
Code is Poetry