get_locale

SummerySummery

Retrieves the current locale.

Syntax

get_locale()

DescriptionDescription

If the locale is set, then it will filter the locale in the ‘locale’ filter hook and return the value.

If the locale is not set already, then the WPLANG constant is used if it is defined. Then it is filtered through the ‘locale’ filter hook and the value for the locale global set and the locale is returned.

The process to get the locale should only be done once, but the locale will always be filtered using the ‘locale’ hook.

ReturnReturn

(string) The locale of the blog or from the 'locale' hook.

SourceSource

File: wp-includes/l10n.php


			

ChangelogChangelog

Changelog
Version Description
1.5.0 Introduced.
Scroll to Top