public function testTranslate() { $adapter = new Zend_Translate_Adapter_XmlTm(dirname(__FILE__) . '/_files/XmlTm_test_en.xml', 'en'); $this->assertEquals('Message 1', $adapter->translate('Message 1')); $this->assertEquals('Message 1', $adapter->_('Message 1')); $this->assertEquals('Message 5', $adapter->translate('Message 5')); }
public function testIsoEncoding() { $adapter = new Zend_Translate_Adapter_XmlTm(dirname(__FILE__) . '/_files/translation_en3.xmltm', 'en'); $this->assertEquals('Message 1 (en)', $adapter->translate('Message 1')); $this->assertEquals('Message 6', $adapter->_('Message 6')); if (PHP_OS == 'AIX') { return; // 'Charsets below are not supported on AIX'; } $this->assertEquals(iconv('UTF-8', 'ISO-8859-1', 'Küchen Möbel (en)'), $adapter->translate('Cooking furniture')); $this->assertEquals('Cooking furniture (en)', $adapter->translate(iconv('UTF-8', 'ISO-8859-1', 'Küchen Möbel'))); }
public function testIsoEncoding() { $adapter = new Zend_Translate_Adapter_XmlTm(dirname(__FILE__) . '/_files/XmlTm_test_en2.xml', 'en'); $this->assertEquals('Message 1 (en)', $adapter->translate('Mess1')); $this->assertEquals('Message 1 (en)', $adapter->_('Mess1')); $this->assertEquals(iconv('UTF-8', 'ISO-8859-1', 'Küchen Möbel (en)'), $adapter->translate('Cooking Furniture')); $this->assertEquals('Cooking Furniture (en)', $adapter->translate(iconv('UTF-8', 'ISO-8859-1', 'Küchen Möbel'))); }