예제 #1
0
 public function Translate($Code, $Default = FALSE)
 {
     $Result = parent::Translate($Code, $Default);
     if (!$Code || substr($Code, 0, 1) == '@') {
         return $Result;
     }
     $Prefix = self::GuessPrefix();
     if (!$Prefix) {
         return $Result;
     }
     if ($Prefix == 'unknown') {
         decho($Code);
         decho(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS));
         die;
     }
     if (Gdn_Theme::InSection('Dashboard')) {
         $Prefix = 'dash_' . $Prefix;
     } else {
         $Prefix = 'site_' . $Prefix;
     }
     $this->_CapturedDefinitions[$Prefix][$Code] = $Result;
     return $Result;
 }
예제 #2
0
 /**
  * Returns whether or not the page is in one of the given section(s).
  *
  * @param string|array $Section
  * @return bool
  * @since 2.1
  */
 function inSection($Section)
 {
     return Gdn_Theme::InSection($Section);
 }