<?php
class Controller_Helper_Url extends Zend_Controller_Action_Helper_Url
{
    private function _getLanguage()
    {
        return Zend_Controller_Front::getInstance()
            ->getParam("bootstrap")
            ->getResource("locale")
            ->getLanguage();
    }
    
    public function simple($action, $controller = null, $module = null, array $params = null)
    {
        return UrlLangDecorator::getUrl(
            parent::simple($action, $controller, $module, $params),
            $this->_getLanguage()
        );
    }

    public function url($urlOptions = array(), $name = null, $reset = false, $encode = true)
    {
        return UrlLangDecorator::getUrl(
            parent::url($urlOptions, $name, $reset, $encode),
            $this->_getLanguage()
        );
    }
}