Prev |  | Next

### method `setVar( `$key`, `$value`)`

This method matches `i18n:name` calls. It builds an interpolation context for later translate calls.

                <?php
    class MyTranslator implements PhpTal\TranslationServiceInterface {
        …
        public function setVar($key, $value){
            $this->_context[$key] = $value;
        }
        …
        private $_context = array();
    }
    ?>

Prev | Up | Next
method `useDomain( `$domain`)` | Home | method `translate( `$key`)`