<?php
class IndexController extends Yaf_Controller_Abstract
{
public function indexAction()
{
// Assuming the client sends "Accept-Language: zh-CN"
$language = $this->getRequest()->getLanguage();
var_dump($language);
}
}
?>
The above example will output
something similar to: