Not sure if this is the best way, but ff you're using Cake 1.2, you could setup routes to map /:language/:controller/:action. Then, you could either (1) override the helpers you need to automatically include the language (either from the session, if you keep it there, or from $params) or (2) manually add the language parameter to each link (using http://api.cakephp.org/1.2/class_helper.html#e2b93ee7f11ae5936be62ccf8b3ce405). For example, $html->link('Login', array('controller' => 'accounts', 'action' => 'login', 'language' => $params['language']). HTH.
On Aug 17, 8:43 am, Charlie <[EMAIL PROTECTED]> wrote: > Hi, > > I searched but didn't found my answer on this topic: > I want to use the language ISO code on my url like:www.example.com/en/ > orwww.example.com/nl/ > This is working fine when I manual add these codes in the url and I > completed also a check in the beforeFilter() if a language was > provided in the url. > > But know I like it to work with $html->link() and $form->create() > functions without checking on the language and add it in all my links > and template code. > Is there a var where you can set a base url that is supported by the > form and html helpers? > > If not, someone else a good idea about this? > thnx! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
