Initialize and set locale for SSO

package sso\lib

 Methods

Retrieve all availables locales for options display

availables() : array<mixed,string>
Static

Returns

array<mixed,string>locale => locale text

Initialize locales constants for SSO and SALT

init() 
Static

Return the options array for locales

options() : array<mixed,mixed>
Static

Returns

array<mixed,mixed>locale => text or array for FormHelper::select(...)

Register current locale in cookie

set(string $locale) : boolean
Static

Parameters

$locale

string

locale to set

Returns

booleanTRUE if cookie is set, FALSE otherwise.

Normalize a locale

normalizeLocale(string $locale) : string
Static

Parameters

$locale

string

locale to normalize

Returns

stringnormalized locale, with only [a-z0-9_]

Retrieve locales to use

retrieveLocales() : array<mixed,string>
Static

Returns

array<mixed,string>List of locale, by preference order

 Properties

 

List of all available locales

$AVAILABLE_LOCALES : array<mixed,string>

Default

NULL
Static

 Constants

   

Name of SSO locale constant

SSO_CURRENT_LOCALE = 'sso\SSO_CURRENT_LOCALE'