Warning: This method has been deprecated. For backward compatibility only instead.

WP_Locale::register_globals() WordPress Method

The WP_Locale::register_globals() is a method used to set up global variables for a given language. This is useful for setting up the environment for multilingual sites. It should be called once for each language, and it will set up the following global variables: $lang $language $languages $text_direction These variables can be used in your theme or plugin code to internationalize your site.

WP_Locale::register_globals() #

Global variables are deprecated.


Description

For backward compatibility only.


Top ↑

Source

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

	public function register_globals() {
		$GLOBALS['weekday']         = $this->weekday;
		$GLOBALS['weekday_initial'] = $this->weekday_initial;
		$GLOBALS['weekday_abbrev']  = $this->weekday_abbrev;
		$GLOBALS['month']           = $this->month;
		$GLOBALS['month_abbrev']    = $this->month_abbrev;
	}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.