installLocale() 정적인 공개 메소드

Install support for a new locale.
static public installLocale ( $locale )
$locale string
예제 #1
0
 /**
  * Install support for an existing locale.
  * @param $locale string
  */
 function installLocale($locale)
 {
     parent::installLocale($locale);
     $genreDao =& DAORegistry::getDAO('GenreDAO');
     /* @var $genreDao GenreDAO */
     $genreDao->installLocale($locale);
     $publicationFormatDao =& DAORegistry::getDAO('PublicationFormatDAO');
     /* @var $publicationFormatDao PublicationFormatDAO */
     $publicationFormatDao->installLocale($locale);
     $userGroupDao =& DAORegistry::getDAO('UserGroupDAO');
     /* @var $userGroupDao UserGroupDAO */
     $userGroupDao->installLocale($locale);
 }
예제 #2
0
 /**
  * Install support for an existing locale.
  * @param $locale string
  */
 static function installLocale($locale)
 {
     parent::installLocale($locale);
     $press = self::$request->getPress();
     if (!$press) {
         // multiple presses, admin context
         $pressDao = DAORegistry::GetDAO('PressDAO');
         $presses = $pressDao->getAll();
         $presses = $presses->toArray();
     } else {
         $presses[] = $press;
     }
     $genreDao = DAORegistry::getDAO('GenreDAO');
     /* @var $genreDao GenreDAO */
     foreach ($presses as $press) {
         $genreDao->installDefaults($press->getId(), array($locale));
     }
     $userGroupDao = DAORegistry::getDAO('UserGroupDAO');
     /* @var $userGroupDao UserGroupDAO */
     $userGroupDao->installLocale($locale);
 }