API / Minn\I18n / SiteLanguage

SiteLanguage final class

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

The site's language as pages declare it: the locale in force (a switched one first, then what pre_determine_locale or the WPLANG option give, 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).

statictag(): string#

The language tag pages carry: the locale with a hyphen, plain "en" read as en_US.

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).