We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

What happened to the Phalcon GetText translation component in the incubator?

I've been hoping to implement some level of translations using the Phalcon GetText component in the incubator.

However 7 days ago, it appears that the GetText adapter was cleared out with a commit labelled "Released 2.0.0".


Does anyone know what the future of GetText is under Phalcon 2.0?

iam implement gettext on phalcon:

in service.php

    $di->set('voltService', function ($view, $di) use ($config) {
    $voltOptions = array();
    $volt = new \Phalcon\Mvc\View\Engine\Volt($view, $di);
    $compiler = $volt->getCompiler();

    if ($config->application->debug) {
        $voltOptions['compileAlways'] = true;
    // Funcion para que volt reconozca multilenguaje
    $compiler->addFunction('_', function($resolvedArgs) {
        return 'gettext(' . $resolvedArgs . ')';
    $compiler->addFilter('ucf', 'ucfirst');
    $compiler->addFilter('flv', 'floatval');
    return $volt;

in my boostrap:

    $lang_default_client = $s_lang_cookie;
setlocale(LC_ALL, 'C.UTF-8');
bindtextdomain("messages", APP_PATH . "public/locale/$lang_default_client");
bind_textdomain_codeset('messages', 'UTF-8');

in my views:

{{ _('Enviar email al grupo de soporte') }}