API / Minn\I18n / SiteLanguage

SiteLanguage final class

Minn\I18n\SiteLanguage · public/minn/src/Minn/I18n/SiteLanguage.php · 53 lines

The site's language as pages declare it: the locale in force (a switched one first, then what the WPLANG option gives, through the locale filter) and the html element's dir and lang attributes, which a plugin may change through language_attributes.

Public

staticlocale(): string#

The locale in force (get_locale): a switched one, else the configured one. pre_determine_locale is determine_locale's, not this one's (probe text-domain-timing); the reference asks it while registering the media player's strings, as the engine now does (probe default-scripts).

staticconfigured(): string#

The locale the WPLANG option names (en_US when it names none), through the locale filter.

statictag(): string#

The language tag pages carry: the locale in force (determine_locale; probe sweep-1020) with a hyphen, plain "en" read as en_US.

staticisRtl(): bool#

Whether the site's language is written right to left (is_rtl).

staticattributes(string $doctype = 'html'): string#

The html element's dir and lang attributes (lang for html, xml:lang for xhtml or a non-HTML html_type).