class Gettext extends Gettext (View source)

Properties

private string $webrootDirectory

Tthe absolute path of the web root.

Methods

__construct(string $webrootDirectory)

Initialize the instance.

load($locale, $filename)

{@inheritdoc}

fixPlurals(string $filename, TextDomain $textDomain, Language $localeInfo)

Fix the plural rules of the translations loaded from a file.

Details

__construct(string $webrootDirectory)

Initialize the instance.

Parameters

string $webrootDirectory

the absolute path of the web root

load($locale, $filename)

{@inheritdoc}

Parameters

$locale
$filename

See also

\Zend\I18n\Translator\Loader\Gettext::load()

private fixPlurals(string $filename, TextDomain $textDomain, Language $localeInfo)

Fix the plural rules of the translations loaded from a file.

Parameters

string $filename
TextDomain $textDomain
Language $localeInfo

Exceptions

RuntimeException