class LocaleManager

Properties

protected $locales
protected $js
protected $css

Methods

__construct(Translator $translator, string|null $cacheDir = null)

No description

string
getLocale()

No description

void
setLocale(string $locale)

No description

void
addLocale(string $locale, string $name)

No description

array
getLocales()

No description

bool
hasLocale(string $locale)

No description

void
addTranslations(string $locale, string $file, string $module = null)

No description

void
addJsFile(string $locale, string $js)

No description

array
getJsFiles(string $locale)

No description

void
addCssFile(string $locale, string $css)

No description

array
getCssFiles(string $locale)

No description

getTranslator()

No description

void
setTranslator(Translator $translator)

No description

void
clearCache()

No description

Details

__construct(Translator $translator, string|null $cacheDir = null)

Parameters

Translator $translator
string|null $cacheDir

string getLocale()

Return Value

string

void setLocale(string $locale)

Parameters

string $locale

Return Value

void

void addLocale(string $locale, string $name)

Parameters

string $locale
string $name

Return Value

void

array getLocales()

Return Value

array

bool hasLocale(string $locale)

Parameters

string $locale

Return Value

bool

void addTranslations(string $locale, string $file, string $module = null)

Parameters

string $locale
string $file
string $module

Return Value

void

void addJsFile(string $locale, string $js)

Parameters

string $locale
string $js

Return Value

void

array getJsFiles(string $locale)

Parameters

string $locale

Return Value

array

void addCssFile(string $locale, string $css)

Parameters

string $locale
string $css

Return Value

void

array getCssFiles(string $locale)

Parameters

string $locale

Return Value

array

Translator getTranslator()

Return Value

Translator

void setTranslator(Translator $translator)

Parameters

Translator $translator

Return Value

void

void clearCache()

Return Value

void