/** * Returns the translation of the given string * * @param string $string [more arguments for printf-like placeholders) * @return string */ public function _($string) { $args = func_get_args(); $translator = \Hynage\I18n\Translator::getInstance(); return call_user_func_array(array($translator, 'translate'), $args); }
public function testSpecificLanguage() { $this->translator->setCurrentLanguage('fr'); $this->assertEquals('salu', $this->translator->translate('hello')); }