コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function getScriptNames($locale = null)
 {
     if (null === $locale) {
         $locale = \Locale::getDefault();
     }
     $scripts = parent::getScriptNames($locale);
     $collator = new \Collator($locale);
     $collator->asort($scripts);
     return $scripts;
 }
コード例 #2
0
 public function testGetScriptNames()
 {
     $sortedScripts = array('Cyrl' => 'cyrillique', 'Latn' => 'latin');
     $this->reader->expects($this->once())->method('readEntry')->with(self::RES_DIR, 'en', array('Scripts'))->will($this->returnValue($sortedScripts));
     $this->assertSame($sortedScripts, $this->bundle->getScriptNames('en'));
 }
コード例 #3
0
ファイル: IcuLanguageBundle.php プロジェクト: dev-lav/htdocs
 public function __construct(StructuredBundleReaderInterface $reader)
 {
     parent::__construct(realpath(IcuData::getResourceDirectory() . '/lang'), $reader);
 }