+ Reply to Thread
Results 1 to 2 of 2

Thread: Zend_Translate & modular directory structure

  1. #1
    ignace is offline Junior Member
    Join Date
    Dec 2007
    Posts
    8

    Default Zend_Translate & modular directory structure

    Does anybody know how i can combine zend_translate with a modular directory structure?

    First i tried to add the translations directly into the module like so:

    default/translations
    default/controllers

    In my IndexController.php i added:

    public function init()
    {
    $this->_translation = new Zend_Translate(adapter, '../translations', null, array('scan' => Zend_Translate::LOCALE_DIRECTORY));
    }

    without any luck, then i tried:

    translations/en/default/index/index
    application/default/presenters/IndexController.php

    added to my bootstrap:

    $tr = new Zend_Translate(adapter, 'translations', null, array('scan' => 2));
    $reg->set('tr', $tr);

    and changed my init() to:

    public function init()
    {
    // the registry key is set in my bootstrap
    $this->_translation = Zend_Registry::get('tr');
    }

    but this does not function either.. and i doubt that using translations/en/index/index will work, maybe translations/module/en/index/index?

    all help is greatly appreciated

  2. #2
    matthijsvandenbos is offline Junior Member
    Join Date
    Jul 2009
    Posts
    2

    Default

    It so happens I wrote an article on my blog about exactly this issue: per module translation sources. I think it can help you out. If you have any questions, you can leave a comment on the article or post them here.

+ Reply to Thread

Similar Threads

  1. Best way to implement Zend_Translate for modular app?
    By darrenl in forum Internationalization (i18n) & Localization (l10n)
    Replies: 0
    Last Post: 08-03-2010, 09:22 PM
  2. Modular structure
    By torin in forum Model-View-Controller (MVC)
    Replies: 4
    Last Post: 02-04-2010, 04:27 PM
  3. quickstart with modular directory structure
    By vincelee888 in forum Installation & Configuration
    Replies: 3
    Last Post: 02-04-2009, 11:22 AM
  4. directory structure vs root directory
    By TheZend in forum Installation & Configuration
    Replies: 1
    Last Post: 07-11-2008, 05:08 PM
  5. access control & translations used in a modular directory structure
    By ignace in forum General Q&A on Zend Framework
    Replies: 0
    Last Post: 01-30-2008, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts