Php 在此服务器上找不到Zend Translate/locale/set/en

Php 在此服务器上找不到Zend Translate/locale/set/en,php,zend-framework,localization,zend-translate,Php,Zend Framework,Localization,Zend Translate,我是zend framework的新手,我发现了您第一次使用它时遇到的明显问题。现在我正在设置un翻译功能,为了保存网站的语言,我放置了两个标志,一个是网站的语言,另一个是英语标志。它应该是这样工作的,我已经建立了一个特定的控制器: <?php class LocaleController extends Zend_Controller_Action { public function init() { // init code

我是zend framework的新手,我发现了您第一次使用它时遇到的明显问题。现在我正在设置un翻译功能,为了保存网站的语言,我放置了两个标志,一个是网站的语言,另一个是英语标志。它应该是这样工作的,我已经建立了一个特定的控制器:

 <?php

 class LocaleController extends Zend_Controller_Action
 {

     public function init()
     {
         // init code       
     }

     public function indexAction()
     {
    // action body
     }

     public function setAction()
     {
    // if supported locale, add to session
    if (Zend_Validate::is($this->getRequest()->getParam('locale'), 'InArray',
            array('haystack' => array('en', 'it'))))
    {
        $session = new Zend_Session_Namespace('ttb.l10n');
        $session->locale = $this->getRequest()->getParam('locale');
    }
    // redirect to requesting URL
    $url = $this->getRequest()->getServer('HTTP_REFERER');
    $this->_redirect($url);
     }


 }
然后在indexController.php文件中,我有:

    public function init()
{
    /* Initialize action controller here */
    $registry = Zend_Registry::getInstance();
    $this->view->locale = $registry->get('Zend_Locale');
}
然后在layout.phtml中,我有以下链接:

        <a href="/locale/set/it"><img src="<?php echo $this->baseUrl(); ?>/immagini/flag/italia.png" title="Italiano"></a>      
        <a href="/locale/set/en"><img src="<?php echo $this->baseUrl(); ?>/immagini/flag/inghilterra.png" title="English"></a>


我正在使用zend framework 1.12…

我只需更改以下链接:

        <a href="<?php echo $this->baseUrl(); ?>/locale/set/it"><img src="<?php echo $this->baseUrl(); ?>/immagini/flag/italia.png" title="Italiano"></a>      
        <a href="<?php echo $this->baseUrl(); ?>/locale/set/en"><img src="<?php echo $this->baseUrl(); ?>/immagini/flag/inghilterra.png" title="English"></a>

        <a href="<?php echo $this->baseUrl(); ?>/locale/set/it"><img src="<?php echo $this->baseUrl(); ?>/immagini/flag/italia.png" title="Italiano"></a>      
        <a href="<?php echo $this->baseUrl(); ?>/locale/set/en"><img src="<?php echo $this->baseUrl(); ?>/immagini/flag/inghilterra.png" title="English"></a>