PHP Class Neos\Flow\I18n\Detector

Datei anzeigen Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$localeCollection LocaleCollection A collection of Locale objects representing currently installed locales, in a hierarchical manner.
$localizationService Service

Public Methods

Method Description
detectLocaleFromHttpHeader ( string $acceptLanguageHeader ) : Locale Returns best-matching Locale object based on the Accept-Language header provided as parameter. System default locale will be returned if no successful matches were done.
detectLocaleFromLocaleTag ( string $localeIdentifier ) : Locale Returns best-matching Locale object based on the locale identifier provided as parameter. System default locale will be returned if no successful matches were done.
detectLocaleFromTemplateLocale ( Locale $locale ) : Locale Returns best-matching Locale object based on the template Locale object provided as parameter. System default locale will be returned if no successful matches were done.
injectLocaleCollection ( LocaleCollection $localeCollection ) : void
injectLocalizationService ( Service $localizationService ) : void

Method Details

detectLocaleFromHttpHeader() public method

Returns best-matching Locale object based on the Accept-Language header provided as parameter. System default locale will be returned if no successful matches were done.
public detectLocaleFromHttpHeader ( string $acceptLanguageHeader ) : Locale
$acceptLanguageHeader string The Accept-Language HTTP header
return Locale Best-matching existing Locale instance

detectLocaleFromLocaleTag() public method

Returns best-matching Locale object based on the locale identifier provided as parameter. System default locale will be returned if no successful matches were done.
public detectLocaleFromLocaleTag ( string $localeIdentifier ) : Locale
$localeIdentifier string The locale identifier as used in Locale class
return Locale Best-matching existing Locale instance

detectLocaleFromTemplateLocale() public method

Returns best-matching Locale object based on the template Locale object provided as parameter. System default locale will be returned if no successful matches were done.
public detectLocaleFromTemplateLocale ( Locale $locale ) : Locale
$locale Locale The template Locale object
return Locale Best-matching existing Locale instance

injectLocaleCollection() public method

public injectLocaleCollection ( LocaleCollection $localeCollection ) : void
$localeCollection LocaleCollection
return void

injectLocalizationService() public method

public injectLocalizationService ( Service $localizationService ) : void
$localizationService Service
return void

Property Details

$localeCollection protected_oe property

A collection of Locale objects representing currently installed locales, in a hierarchical manner.
protected LocaleCollection,Neos\Flow\I18n $localeCollection
return LocaleCollection

$localizationService protected_oe property

protected Service,Neos\Flow\I18n $localizationService
return Service