title: Translating route segments with ZF's gettext adapter
body: <p>I want to try out the route translations in Zend Framework, but I'm using the gettext adapter and the most tutorials have PHP translate adapter, so I'm having problems to make it work.</p>
  
  <p>In the main Bootstrap.php I have the method in which I set the routes:</p>
  
  <pre><code>$front = Zend_Controller_Front::getInstance();
  $router = $front-&gt;getRouter();
  
  $translator = Zend_Registry::get('Zend_Translate');
  Zend_Controller_Router_Route::setDefaultTranslator($translator);
  
  $routerRoute = new Zend_Controller_Router_Route('@about',
       array(
        'module'     =&gt; 'default',
        'controller' =&gt; 'index',
        'action'     =&gt; 'about'
      )
  );
  $router-&gt;addRoute('about', $routerRoute);
  </code></pre>
  
  <p>This works for <code>/about</code> path.
  I'll paste the code in which I set Zend_Translate, but it basically loads a <code>*.mo</code> file depending on current session language:</p>
  
  <pre><code>$langParam = $this-&gt;getSessionLang();
  
  $localeString = $languages[$langParam];
  $locale       = new Zend_Locale($localeString);
  
  $moFilePath = $langFolder . $langParam . '.mo';
  if (!file_exists($moFilePath)) {
      throw new Zend_Exception('File does not exist: ' . $moFilePath);
  }
  
  $translate = new Zend_Translate(
          array(
              'adapter'        =&gt; 'gettext',
              'content'        =&gt; $moFilePath,
              'locale'         =&gt; $locale,
              'ignore'         =&gt; array('.'), // ignore SVN folders
              'disableNotices' =&gt; ('production' === APPLICATION_ENV) // disable notices in Production
              )
          );
  
  Zend_Registry::set('Zend_Translate', $translate);
  Zend_Registry::set('Zend_Locale'   , $locale); 
  </code></pre>
  
  <p>This, ofc, it's called <code>prior</code> to routing.</p>
  
  <p>My question: can gettext be used as a translation adapter for a route, because I can't figure out how can I catch the <code>@about</code> string with, let's say, poEdit? It can? Hooray! How?</p>