cake-php@googlegroups.com
[Top] [All Lists]

Re: locale mit pages

Subject: Re: locale mit pages
From: Ivo Wolgensinger
Date: Fri, 23 Mar 2012 08:05:36 -0700 PDT
Sorry, now in english:


In my cakePHP-environment (version 2) the following code in
AppController:

        $locale = $this->Session->read('Config.language');
        //if ($locale && file_exists(VIEWS . DS . $this-
>viewPath .DS . $locale . DS)) {
        if ($locale && file_exists($_SERVER['DOCUMENT_ROOT'] . '/
cake2/
 app/View/Pages/'.$locale.'/')) {
            echo $this->viewPath . DS . $locale;
            $this->viewPath = $this->viewPath . DS . $locale;
        }

Everything works fine. But the outcommented line is how to do it (in
cakephp-style). But it doesn't work in my example. Does anybody know
what I do wrong? There is no error message. My pages structure ist the
following:
- default files: View/Pages/
- files in another language: View/Pages/deu, View/Pages/ita etc.

Thank you for any help.

Ivo

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php

<Prev in Thread] Current Thread [Next in Thread>