public function TranslatorTest::testTransWithFallbackLocaleTer in Plug 7
File
- lib/
Symfony/ translation/ Tests/ TranslatorTest.php, line 244
Class
Namespace
Symfony\Component\Translation\TestsCode
public function testTransWithFallbackLocaleTer() {
$translator = new Translator('fr_FR');
$translator
->addLoader('array', new ArrayLoader());
$translator
->addResource('array', array(
'foo' => 'foo (en_US)',
), 'en_US');
$translator
->addResource('array', array(
'bar' => 'bar (en)',
), 'en');
$translator
->setFallbackLocales(array(
'en_US',
'en',
));
$this
->assertEquals('foo (en_US)', $translator
->trans('foo'));
$this
->assertEquals('bar (en)', $translator
->trans('bar'));
}