title: Can't understand why i can't call a method
body: <p>Zend 2 Framework, layout.phtml.</p>
  
  <p>Here i can translate strings with $this->translate('key') but i can't get locale with $this->getLocale(). Why? They're both methods from the same class Translator! All i get is this exception:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception
    'Zend\ServiceManager\Exception\ServiceNotFoundException' with message
    'Zend\View\HelperPluginManager::get was unable to fetch or create an
    instance for getLocale' in
    D:\Dropbox\Projects\www\linksync\vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php
    on line 496</p>
  </blockquote>
  
  <p>Here's my module.config.php (Application module)</p>
  
  <pre><code>&lt;?php
  return array(
      'router' =&gt; array(
          'routes' =&gt; array(
              'home' =&gt; array(
                  'type' =&gt; 'Segment',
                  'options' =&gt; array(
                      'route'    =&gt; '/[:lang]',
                      'constraints' =&gt; array(
                          'lang'       =&gt; '[a-zA-Z]{2}',
                      ),
                      'defaults' =&gt; array(
                          'controller' =&gt; 'Application\Controller\Index',
                          'action'     =&gt; 'index',
                          'lang'       =&gt; 'en',
                      ),
                  ),
              ),
              // The following is a route to simplify getting started creating
              // new controllers and actions without needing to create a new
              // module. Simply drop new controllers in, and you can access them
              // using the path /application/:lang/:controller/:action
              'application' =&gt; array(
                  'type'    =&gt; 'Literal',
                  'options' =&gt; array(
                      'route'    =&gt; '/application',
                      'defaults' =&gt; array(
                          '__NAMESPACE__' =&gt; 'Application\Controller',
                          'controller'    =&gt; 'Index',
                          'action'        =&gt; 'index',
                      ),
                  ),
                  'may_terminate' =&gt; true,
                  'child_routes' =&gt; array(
                      'default' =&gt; array(
                          'type'    =&gt; 'Segment',
                          'options' =&gt; array(
                              'route'    =&gt; '/[:lang[/:controller[/:action[/:id]]]]',
                              'constraints' =&gt; array(
                                  'lang'       =&gt; '[a-zA-Z]{2}',
                                  'controller' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                                  'action'     =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                                  'id'         =&gt; '[0-9]+',
                              ),
                              'defaults' =&gt; array(
                              ),
                          ),
                      ),
                  ),
              ),
          ),
      ),
      'service_manager' =&gt; array(
          'abstract_factories' =&gt; array(
              'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
              'Zend\Log\LoggerAbstractServiceFactory',
          ),
          'aliases' =&gt; array(
              'translatorMvc' =&gt; 'MvcTranslator',
          ),
          'factories' =&gt; array(
              'navigation' =&gt; 'Zend\Navigation\Service\DefaultNavigationFactory',
              'translator' =&gt; 'Zend\I18n\Translator\TranslatorServiceFactory',
          ),
      ),
      'translator' =&gt; array(
          'locale' =&gt; 'en_US',
          'translation_file_patterns' =&gt; array(
              array(
                  'type'     =&gt; 'gettext',
                  'base_dir' =&gt; __DIR__ . '/../language',
                  'pattern'  =&gt; '%s.mo',
              ),
          ),
      ),
      'controllers' =&gt; array(
          'invokables' =&gt; array(
              'Application\Controller\Index' =&gt; 'Application\Controller\IndexController'
          ),
      ),
      'view_manager' =&gt; array(
          'display_not_found_reason' =&gt; true,
          'display_exceptions'       =&gt; true,
          'doctype'                  =&gt; 'HTML5',
          'not_found_template'       =&gt; 'error/404',
          'exception_template'       =&gt; 'error/index',
          'template_map' =&gt; array(
              'layout/layout'           =&gt; __DIR__ . '/../view/layout/layout.phtml',
              'application/index/index' =&gt; __DIR__ . '/../view/application/index/index.phtml',
              'error/404'               =&gt; __DIR__ . '/../view/error/404.phtml',
              'error/index'             =&gt; __DIR__ . '/../view/error/index.phtml',
          ),
          'template_path_stack' =&gt; array(
              __DIR__ . '/../view',
          ),
      ),
      // Placeholder for console routes
      'console' =&gt; array(
          'router' =&gt; array(
              'routes' =&gt; array(
              ),
          ),
      ),
  );
  </code></pre>