Skip to content

Releases: php-gettext/Gettext

3.5.4

28 Oct 11:26
Compare
Choose a tag to compare
  • Escaped control characters (like EOT) on generate .po ( #84 )

3.5.3

27 Aug 17:49
Compare
Choose a tag to compare

Added Gettext\Translations::MERGE_OVERRIDE constant #80

3.5.2

26 Aug 13:11
Compare
Choose a tag to compare

Fixed the emulation of context related functions with gettext extension: pgettext, npgettext, dpgettext, dnpgettext

3.5.1

26 Aug 10:23
Compare
Choose a tag to compare

Fixed JsCode extractor that didn't handle strings with quotes inside #79

3.5.0

25 Aug 12:01
Compare
Choose a tag to compare
  • New Gettext\GettextTranslator to use the gettext extension of php with the same api than Gettext\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

13 Aug 08:22
Compare
Choose a tag to compare

Fixed JsonDictionary generator that gives an error in strict mode #78

3.4.2

29 Apr 09:09
Compare
Choose a tag to compare
  • Fixed a bug from the 3.4.1 #74
  • Improved Twig extractor #73

3.4.1

28 Apr 14:41
Compare
Choose a tag to compare
  • On scan php code, avoid empty strings like __('') #72

3.4

06 Apr 09:43
Compare
Choose a tag to compare
3.4
  • New twig extractor (thanks @Exnor )
  • Added dependencies in dev context to test 3rd party libraries (blade and twig)

3.3

16 Feb 12:09
Compare
Choose a tag to compare
3.3

Removed Gettext\Utils\Locales and use gettext/languages as a dependency to get the info of any language