PHP Classes

File: application/bootstrap.php

Recommend this page to a friend!
  Classes of solomongaby   GSD_Controller_Plugin_Language   application/bootstrap.php   Download  
File: application/bootstrap.php
Role: Configuration script
Content type: text/plain
Description: the lines you need to add bootstrap file to configure the plugin
Class: GSD_Controller_Plugin_Language
Handle multi-language URLs with Zend Framework
Author: By
Last change: fixing some typo
Date: 14 years ago
Size: 415 bytes


Class file image Download
// Register the plugin
Zend_Controller_Front::getInstance()->registerPlugin(new GSD_Controller_Plugin_Language());

// adding the URL route
$route = new Zend_Controller_Router_Route(
                    'language' => 'en',
                    'module' => 'default',
                    'controller' => 'index',
                    'action' => 'index'
        $router->addRoute('lang_default', $route);