packagist gettext/gettext v3.5.0
3.5.0

latest releases: 4.x-dev, v4.8.10, dev-master...
8 years ago
  • 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');

Don't miss a new gettext release

NewReleases is sending notifications on new releases.