/** * ZF-6724 */ public function testTranslationWithPercent() { $trans = new Translator\Translator('arrayAdapter', array('one' => 'eins', "two %1\$s" => "zwei %1\$s", "three %1\$s %2\$s" => "drei %1\$s %2\$s", 'vier%ig' => 'four%'), 'de'); $trans->setLocale('de'); $this->helper->setTranslator($trans); $this->assertEquals("four%", $this->helper->direct("vier%ig")); $this->assertEquals("zwei 100", $this->helper->direct("two %1\$s", "100")); }
/** * @group ZF2-140 */ public function testSetTranslatorWithTranslation() { $trans = new Translator\Translator('arrayAdapter', array('one' => 'eins', "two %1\$s" => "zwei %1\$s", "three %1\$s %2\$s" => "drei %1\$s %2\$s", 'vier%ig' => 'four%'), 'de'); $this->helper->setTranslator($trans); }