CoolCMS API

LocalizationInitTrait uses trait:short

Table of Contents

Properties

$loc  : string
$localizationContext  : LocalizationContext
$localizationManager  : LocalizationManager
$localizationPaymentRegionManager  : PaymentRegionManager
NOTE: deliberately named differently; presenters often have `$paymentRegionManager` in the constructor (property collision).

Methods

getLocalizationContext()  : LocalizationContext
initializeLocalization()  : array{string, string}
loadLocalization()  : Localization|null
localizationCurrencyKey()  : string|null
Returns the currency key of the localization's payment region.

Properties

$localizationPaymentRegionManager

NOTE: deliberately named differently; presenters often have `$paymentRegionManager` in the constructor (property collision).

public PaymentRegionManager $localizationPaymentRegionManager
Attributes
#[Inject]

Methods

initializeLocalization()

private initializeLocalization() : array{string, string}
Return values
array{string, string} —

[default language, default currency]

localizationCurrencyKey()

Returns the currency key of the localization's payment region.

private localizationCurrencyKey(object $localization) : string|null

A localization has no currency of its own. Null means a localization without a region or a region without a currency; callers fall back to eur.

Parameters
$localization : object
Return values
string|null
On this page

Search results