Releases: php-gettext/Gettext
Releases · php-gettext/Gettext
3.5.4
3.5.3
3.5.2
Fixed the emulation of context related functions with gettext extension: pgettext
, npgettext
, dpgettext
, dnpgettext
3.5.1
3.5.0
-
New
Gettext\GettextTranslator
to use the gettext extension of php with the same api thanGettext\Translator
.$translator = new Gettext\GettextTranslator(); $translator->loadDomain('messages', 'myApp/Locale'); echo $translator->gettext('hello world');
-
New method
Translator::register()
to ease the registry of the translator in the global functions://before: Gettext\Translator::initGettextFunctions($translator); //now: $translator->register();
-
New magic methods
addFrom[Extractor][File/String]
to add translations easily:$translations = Gettext\Translations::fromPoFile('locales.po'); $translations->addFromPhpCodeFile('template.php'); $translations->addFromJsCodeFile('app.js');
3.4.3
3.4.2
3.4.1
3.4
3.3
Removed Gettext\Utils\Locales
and use gettext/languages as a dependency to get the info of any language