function prepare($args) { parent::prepare($args); common_debug('IndexAction -> redirect -> ' . $this->lang); common_redirect(common_get_route('home', array('lang' => $this->lang)), 303); return true; }
function getHreflangs() { $hreflangs = array(); $langs = common_config('site', 'langs'); common_debug('Langs:' . print_r($langs, true)); foreach ($langs as $key => $lang) { $hreflangs[] = array('lang' => $key, 'href' => common_get_route('home', array('lang' => $key))); } return $hreflangs; }