On Fri, Jan 14, 2011 at 3:44 AM, Erik_V <[email protected]> wrote: > Dr Loboto, > > Thank you; your suggestion is exactly what I've been using upto now. > This seems this has one serious drawback: I have to add a $this- >>params['language'] to each cake generated link. > It breaks the automagically generated links and adds a lot of work; or > perhaps I missing something?
Have a look here: http://cakedc.com/pierre_martin/2010/08/05/i18n-routes-with-cakephp-1-3 You also can do itwithout a route class, though. To get around having to add 'lang' to your link() calls, you can overload Helper::url() like so: class AppHelper extends Helper { public function url($url = null, $full = false) { if (!isset($url['lang'])) { $url['lang'] = Configure::read('Config.language'); } return parent::url($url, $full); } } Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
