Class Phalcon\Translate\Factory

extends abstract class Phalcon\Factory

implements Phalcon\FactoryInterface

Source on GitHub

Loads Translate Adapter class using ‘adapter’ option

<?php

use Phalcon\Translate\Factory;

$options = [
    "locale"        => "de_DE.UTF-8",
    "defaultDomain" => "translations",
    "directory"     => "/path/to/application/locales",
    "category"      => LC_MESSAGES,
    "adapter"       => "gettext",
];
$translate = Factory::load($options);

Methods

public static load (Phalcon\Config array $config)

protected static loadClass (mixed $namespace, mixed $config) inherited from Phalcon\Factory