Releases
v4.0.0
Breaking changes
PHP >= 5.4 compatibility (dropped PHP 5.3 support)
New class Merge
, that changes the way to merge translations.
Gettext\Translation::getPluralTranslation()
renamed to Translation::getPluralTranslations()
and always returns an array with all plural translations
Removed the print functions like __e()
, n__e()
, p__e()
, etc. Use <?= __('text') ?>
instead.
The format PhpArray
has a different structure
Removed Gettext\Translation::normaliceTranslationCount()
to improve performance
Removed Gettext\Translator::initGettextFunction()
. Use $translator->register()
.
Invalid languages throw a InvalidArgumentException
in Translations::setLanguage()
If not specified, the default domain for translations is an empty string instead "messages"
Changed the extractor and generator interfaces and allow to pass an array with the options instead use static properties.
Removed the ability to include empty translations on generate Mo.
New extractors/generators
Other changes
Added the $checkContent
argument to Translation::hasPluralTranslations()
to check whether the plural translation contains any text or not
Added Translations::$options
to configure some default headers.
Prevent to insert duplicated comments, flags and extracted comments in a translation
Translations::register()
returns the previous registered translations instance if exists.
Improved tests
Bugfixes
Code improvements
You can’t perform that action at this time.