class Detector (View source)

Methods

Section|null
getPreferredSection()

Returns the preferred section based on session, cookie, user object, default browser (if allowed), and finally site preferences.

setupSiteInterfaceLocalization(Page $c = null)

Set the locale associated to the 'site' localization context.

bool
isEnabled()

Check if there's some multilingual section.

bool
canSetSessionValue()

No description

Details

Section|null getPreferredSection()

Returns the preferred section based on session, cookie, user object, default browser (if allowed), and finally site preferences.

Since the user's language is not a locale but a language, attempts to determine best section for the given language.

Return Value

Section|null

setupSiteInterfaceLocalization(Page $c = null)

Set the locale associated to the 'site' localization context.

Parameters

Page $c The page to be used to determine the site locale (if null we'll use the current page)

Exceptions

Exception

bool isEnabled()

Check if there's some multilingual section.

Return Value

bool

Exceptions

Exception

protected bool canSetSessionValue()

Return Value

bool