I'm creating a website with a public - multilingual - part, and an admin part
(which is only in english).
The public part has urls like /[:language]/[:controller]/[:action]
In ZF1, i would've created two modules for that and then write the following
code:
[index.php]
$FrontController = Zend_Controller_Front::getInstance();
$FrontController->registerPlugin(new Website_Controller_Plugin_Language());
And then the class:
class Website_Controller_Plugin_Language extends
Zend_Controller_Plugin_Abstract
{
public function routeStartup(Zend_Controller_Request_Abstract $request)
{
// logic that extracts the language and sets a new path
}
}
using $path = $this->_request->getPathInfo(); i could determine the path,
then extract the language (save it in the registry) and then set a new path
without the language like this:
$request->setPathInfo($path_without_language);
How (and where) do i do this in ZF2?
While i can still find a lot of blog-posts and other tutorials explaining
how to do this in ZF1, there's not much information about ZF2. I couldn't
find it in the manual either.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/zf2-How-to-create-a-website-with-a-multilingual-part-tp4659349.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]