views:

42

answers:

1

I am very experienced with the CakePHP framework but am checking out the Zend Framework for an application that will receive massive traffic.

I need to set up some non-standard routes and add in i18n (url-based) and have seen some parts of the reference documentation that refer to this, and creating Registry keys etc, but I've not found any information about how to do this practically - how do I "Put it into the registry with the key Zend_Translate." what file should I even be doing this in?

Any help would be much appreciated.

A: 

Your best will be to do it in the Bootstrap file, so you can have the translation object in all of your application.

Chris
Thanks for your answer, however, I'm still unsure what I need to do to achieve what I want. Essentially, I want urls in the form /:locale/xxx to map through to a specific controller and action, and for that locale to be utilised by all translations in the app. Do I add it in application/bootstrap.php? I think I know how to add routes, but don't know how to get access to the router to call addRoute on it. Note, I am using the latest version and the bootstrap recommended by the quickstart guide whereby the contents of the bootstrap.php file is a class called Bootstrap.php
neilcrookes
No worries, got it:$router = Zend_Controller_Front::getInstance()->getRouter();
neilcrookes
Yea that's the way to do it, althought if you are using the bootstrap, then you should use something like: $this->bootstrap('frontController'); $front = $this->getResource('frontController');
Chris