Gdn::locale PHP Method

locale() public static method

public static locale ( ) : Gdn_Locale
return Gdn_Locale
    public static function locale()
    {
        if (is_null(self::$_Locale)) {
            self::$_Locale = self::factory(self::AliasLocale);
        }
        return self::$_Locale;
    }

Usage Example

 public function base_render_before($sender)
 {
     // Bail out if we're in the dashboard
     if (inSection('Dashboard')) {
         return;
     }
     // Fetch the currently enabled locale (en by default)
     $locale = Gdn::locale()->current();
     $sender->setData('locale', $locale);
     $sender->Head->addCss('./themes/custom/design/extra.css');
 }
All Usage Examples Of Gdn::locale