Example #1
0
 /**
  * Like previous function, but with i18n support.
  * It's allow to serve static content build with the template engine.
  * The first variable part of the url must be the language code.
  * /[en|fr|de]/home
  * /[en|fr|de]/contacts
  */
 public function simpleWithLocale($request, $match, $template)
 {
     Translation::setLocale(strtolower($match[1]));
     return shortcuts\Template::RenderToResponse($template, array(), $request);
 }
Example #2
0
 public function hello_doe($request, $match)
 {
     $parms = array('name' => urldecode($match[1]));
     return shortcuts\Template::RenderToResponse('hello.html', $parms, $request);
 }