class LocaleManager

Properties

protected Translator $translator
protected $locales
protected $js
protected $css
protected string $cacheDir

Methods

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

No description

string
getLocale()

No description

setLocale(string $locale)

No description

addLocale(string $locale, string $name)

No description

array
getLocales()

No description

bool
hasLocale(string $locale)

No description

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

No description

addJsFile(string $locale, string $js)

No description

array
getJsFiles(string $locale)

No description

addCssFile(string $locale, string $css)

No description

array
getCssFiles(string $locale)

No description

getTranslator()

No description

setTranslator(Translator $translator)

No description

clearCache()

No description

Details

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

Parameters

Translator $translator
string $cacheDir

string getLocale()

Return Value

string

setLocale(string $locale)

Parameters

string $locale

addLocale(string $locale, string $name)

Parameters

string $locale
string $name

array getLocales()

Return Value

array

bool hasLocale(string $locale)

Parameters

string $locale

Return Value

bool

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

Parameters

string $locale
$file
string $module

addJsFile(string $locale, string $js)

Parameters

string $locale
string $js

array getJsFiles(string $locale)

Parameters

string $locale

Return Value

array

addCssFile(string $locale, string $css)

Parameters

string $locale
string $css

array getCssFiles(string $locale)

Parameters

string $locale

Return Value

array

Translator getTranslator()

Return Value

Translator

setTranslator(Translator $translator)

Parameters

Translator $translator

clearCache()