class LocaleManager (View source)

Class LocaleManager Manages locale settings for the application.

Methods

__construct(array $supportedLocales, string $localeDirectory, LoggerInterface|null $logger = null)

LocaleManager constructor.

void
setLocale(string $locale)

Sets the locale for the application.

Details

__construct(array $supportedLocales, string $localeDirectory, LoggerInterface|null $logger = null)

LocaleManager constructor.

Parameters

array $supportedLocales

List of supported locales.

string $localeDirectory

Directory where locale files are stored.

LoggerInterface|null $logger

void setLocale(string $locale)

Sets the locale for the application.

Parameters

string $locale

The locale to set.

Return Value

void