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 toTranslation::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
inTranslations::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
- Yaml
- Csv
- Xliff
- Json
Other changes
- Added the
$checkContent
argument toTranslation::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